mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
mpegvideo: operate with pointers to AVFrames instead of whole structs
The most interesting parts are initialization in ff_MPV_common_init() and uninitialization in ff_MPV_common_end(). ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL checks for Picture.f, because these functions can be called on uninitialized or partially initialized Pictures. NULL pointer checks are added to ff_thread_release_buffer() stub function. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
@@ -2292,7 +2292,8 @@ int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags)
|
||||
|
||||
void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f)
|
||||
{
|
||||
av_frame_unref(f->f);
|
||||
if (f->f)
|
||||
av_frame_unref(f->f);
|
||||
}
|
||||
|
||||
void ff_thread_finish_setup(AVCodecContext *avctx)
|
||||
|
||||
Reference in New Issue
Block a user