diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-21 15:33:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-21 15:33:52 +0200 |
commit | a23748a80429399bf30abf9ff16d23eb8b85b9c4 (patch) | |
tree | 5ea4d98a0f498a6d931fd6118c2a9ab859ffd17c | |
parent | 6961f9f9f4a092e9aff5ca6924b2d69e42827d52 (diff) | |
parent | d8e89a37267f276afd404bd062e5112a336d1a36 (diff) | |
download | ffmpeg-a23748a80429399bf30abf9ff16d23eb8b85b9c4.tar.gz |
Merge commit 'd8e89a37267f276afd404bd062e5112a336d1a36' into release/1.1
* commit 'd8e89a37267f276afd404bd062e5112a336d1a36':
h264: reset data partitioning at the beginning of each decode call
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index c181ab5e64..386ba7ea37 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4193,6 +4193,13 @@ again: } break; case NAL_DPA: + if (s->flags2 & CODEC_FLAG2_CHUNKS) { + av_log(h->s.avctx, AV_LOG_ERROR, + "Decoding in chunks is not supported for " + "partitioned slices.\n"); + return AVERROR(ENOSYS); + } + init_get_bits(&hx->s.gb, ptr, bit_length); hx->intra_gb_ptr = hx->inter_gb_ptr = NULL; @@ -4329,6 +4336,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, s->flags = avctx->flags; s->flags2 = avctx->flags2; + /* reset data partitioning here, to ensure GetBitContexts from previous + * packets do not get used. */ + s->data_partitioning = 0; /* end of stream, output what is still in the buffers */ if (buf_size == 0) { |