[FFmpeg-cvslog] avcodec/h264: reset the counts in the correct context

Michael Niedermayer git at videolan.org
Sat Apr 25 17:04:43 CEST 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Wed Apr  8 13:38:55 2015 +0200| [4191e01e9906a88f4686ee2e20928538da3d4b96] | committer: Michael Niedermayer

avcodec/h264: reset the counts in the correct context

Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 8f8d632220100bfde26587b27da73901b05cb774)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4191e01e9906a88f4686ee2e20928538da3d4b96
---

 libavcodec/h264.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 704c089..2821747 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1728,7 +1728,7 @@ again:
             if (err < 0 || err == SLICE_SKIPED) {
                 if (err < 0)
                     av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n");
-                h->ref_count[0] = h->ref_count[1] = h->list_count = 0;
+                hx->ref_count[0] = hx->ref_count[1] = hx->list_count = 0;
             } else if (err == SLICE_SINGLETHREAD) {
                 if (context_count > 1) {
                     ret = ff_h264_execute_decode_slices(h, context_count - 1);



More information about the ffmpeg-cvslog mailing list