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:
wm4
2014-03-31 17:46:29 +00:00
committed by Vittorio Giovara
parent 60fd7d36c4
commit f6774f905f
34 changed files with 411 additions and 381 deletions

View File

@@ -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)