[FFmpeg-cvslog] h264: reset h-> ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()
Laurent Aimar
git at videolan.org
Mon Mar 19 05:30:21 CET 2012
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Sun Oct 2 14:03:47 2011 +0000| [ba31a0168131a5dfc4ca521720f998229abbb1a5] | committer: Reinhard Tartler
h264: reset h->ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
(cherry picked from commit 4c7a232fc81fdbdee279ab819a255f624a22b083)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba31a0168131a5dfc4ca521720f998229abbb1a5
---
libavcodec/h264.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 9d40100..c9187e6 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2896,8 +2896,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
ff_h264_fill_default_ref_list(h);
}
- if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0)
+ if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0) {
+ h->ref_count[1]= h->ref_count[0]= 0;
return -1;
+ }
if(h->slice_type_nos!=AV_PICTURE_TYPE_I){
s->last_picture_ptr= &h->ref_list[0][0];
More information about the ffmpeg-cvslog
mailing list