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/h261dec.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/h261dec.c')
-rw-r--r-- | libavcodec/h261dec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index d6e52729a1..0d996eb4e9 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -608,8 +608,8 @@ retry: } // for skipping the frame - s->current_picture.f.pict_type = s->pict_type; - s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; + s->current_picture.f->pict_type = s->pict_type; + s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) || @@ -632,10 +632,10 @@ retry: } ff_MPV_frame_end(s); - assert(s->current_picture.f.pict_type == s->current_picture_ptr->f.pict_type); - assert(s->current_picture.f.pict_type == s->pict_type); + assert(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type); + assert(s->current_picture.f->pict_type == s->pict_type); - if ((ret = av_frame_ref(pict, &s->current_picture_ptr->f)) < 0) + if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0) return ret; ff_print_debug_info(s, s->current_picture_ptr); |