diff options
author | wm4 <nfxjfg@googlemail.com> | 2014-03-31 17:46:29 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-04-09 02:12:19 +0200 |
commit | f6774f905fb3cfdc319523ac640be30b14c1bc55 (patch) | |
tree | 6f0db53a2febce58c562d383e1f3f61c9c256275 /libavcodec/vaapi_mpeg2.c | |
parent | 60fd7d36c47d62d4c603bf16c213b1a924f5cfcf (diff) | |
download | ffmpeg-f6774f905fb3cfdc319523ac640be30b14c1bc55.tar.gz |
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>
Diffstat (limited to 'libavcodec/vaapi_mpeg2.c')
-rw-r--r-- | libavcodec/vaapi_mpeg2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c index e0f9193144..03fb6702e6 100644 --- a/libavcodec/vaapi_mpeg2.c +++ b/libavcodec/vaapi_mpeg2.c @@ -73,10 +73,10 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_ switch (s->pict_type) { case AV_PICTURE_TYPE_B: - pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture.f); + pic_param->backward_reference_picture = ff_vaapi_get_surface_id(s->next_picture.f); // fall-through case AV_PICTURE_TYPE_P: - pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture.f); + pic_param->forward_reference_picture = ff_vaapi_get_surface_id(s->last_picture.f); break; } |