Browse Source

avcodec/h264: reset the counts in the correct context

Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8f8d632220)
tags/n2.4.9
Michael Niedermayer 11 years ago
parent
commit
4191e01e99
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/h264.c

+ 1
- 1
libavcodec/h264.c View File

@@ -1728,7 +1728,7 @@ again:
if (err < 0 || err == SLICE_SKIPED) { if (err < 0 || err == SLICE_SKIPED) {
if (err < 0) if (err < 0)
av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n"); 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) { } else if (err == SLICE_SINGLETHREAD) {
if (context_count > 1) { if (context_count > 1) {
ret = ff_h264_execute_decode_slices(h, context_count - 1); ret = ff_h264_execute_decode_slices(h, context_count - 1);


Loading…
Cancel
Save