@ -744,6 +744,7 @@ void UBFFmpegVideoEncoderWorker::writeLatestVideoFrame()
{
{
AVFrame * frame = mImageQueue . dequeue ( ) ;
AVFrame * frame = mImageQueue . dequeue ( ) ;
writeFrame ( frame , mVideoPacket , mController - > mVideoStream , mController - > mOutputFormatContext ) ;
writeFrame ( frame , mVideoPacket , mController - > mVideoStream , mController - > mOutputFormatContext ) ;
av_freep ( & frame - > data [ 0 ] ) ;
av_frame_free ( & frame ) ;
av_frame_free ( & frame ) ;
}
}
@ -756,6 +757,7 @@ void UBFFmpegVideoEncoderWorker::writeLatestAudioFrame()
# if LIBAVFORMAT_VERSION_MICRO < 100
# if LIBAVFORMAT_VERSION_MICRO < 100
if ( audio_samples_buffer ) {
if ( audio_samples_buffer ) {
av_free ( audio_samples_buffer ) ;
av_free ( audio_samples_buffer ) ;
av_freep ( & frame - > data [ 0 ] ) ;
audio_samples_buffer = NULL ;
audio_samples_buffer = NULL ;
}
}
# endif
# endif