diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-04-23 22:26:40 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-04-24 13:06:02 +0200 |
commit | 945a1b7ab9b9df317e175e480a135a41e7e05b5c (patch) | |
tree | 9b9e3209ed27e15624840d4877c01db325075491 | |
parent | cf7bb6ceb1da7682aa54989f83d81c67a5e6790d (diff) | |
download | ffmpeg-945a1b7ab9b9df317e175e480a135a41e7e05b5c.tar.gz |
h264: reset next_output_pic earlier in start_frame()
In case start_frame() fails, this potentially invalid frame can still be
output to the caller.
Bug-Id: 672
Bug-Id: debian/741240
Bug-Id: ubuntu/1288206
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 702a272d98..fab23a5ffc 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1290,6 +1290,8 @@ int ff_h264_frame_start(H264Context *h) int i; const int pixel_shift = h->pixel_shift; + h->next_output_pic = NULL; + if (ff_MPV_frame_start(s, s->avctx) < 0) return -1; ff_er_frame_start(s); @@ -1341,8 +1343,6 @@ int ff_h264_frame_start(H264Context *h) s->current_picture_ptr->field_poc[0] = s->current_picture_ptr->field_poc[1] = INT_MAX; - h->next_output_pic = NULL; - assert(s->current_picture_ptr->long_ref == 0); return 0; |