From f6774f905fb3cfdc319523ac640be30b14c1bc55 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 31 Mar 2014 17:46:29 +0000 Subject: 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 --- libavcodec/vdpau_vc1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/vdpau_vc1.c') diff --git a/libavcodec/vdpau_vc1.c b/libavcodec/vdpau_vc1.c index 392c511ac8..b100daa981 100644 --- a/libavcodec/vdpau_vc1.c +++ b/libavcodec/vdpau_vc1.c @@ -44,12 +44,12 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx, switch (s->pict_type) { case AV_PICTURE_TYPE_B: - ref = ff_vdpau_get_surface_id(&s->next_picture.f); + ref = ff_vdpau_get_surface_id(s->next_picture.f); assert(ref != VDP_INVALID_HANDLE); info->backward_reference = ref; /* fall-through */ case AV_PICTURE_TYPE_P: - ref = ff_vdpau_get_surface_id(&s->last_picture.f); + ref = ff_vdpau_get_surface_id(s->last_picture.f); assert(ref != VDP_INVALID_HANDLE); info->forward_reference = ref; } -- cgit v1.2.3