diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-04 16:26:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-04 16:44:32 +0100 |
commit | c93e69136925e97e6829ca1e9b5632991fa3b6ae (patch) | |
tree | 52b81e60d071642d3c89678a86feff2500ea02fb | |
parent | 9a082fec1af547f0e777a55186fdd7887d7dfa0d (diff) | |
parent | 1f097d168d9cad473dd44010a337c1413a9cd198 (diff) | |
download | ffmpeg-c93e69136925e97e6829ca1e9b5632991fa3b6ae.tar.gz |
Merge commit '1f097d168d9cad473dd44010a337c1413a9cd198'
* commit '1f097d168d9cad473dd44010a337c1413a9cd198':
h264: reset data partitioning at the beginning of each decode call
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 70952f2c07..574afcaa5e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1846,7 +1846,6 @@ static int decode_update_thread_context(AVCodecContext *dst, h->picture_structure = h1->picture_structure; h->qscale = h1->qscale; h->droppable = h1->droppable; - h->data_partitioning = h1->data_partitioning; h->low_delay = h1->low_delay; for (i = 0; h->DPB && i < MAX_PICTURE_COUNT; i++) { @@ -4997,6 +4996,13 @@ again: } break; case NAL_DPA: + if (h->avctx->flags & CODEC_FLAG2_CHUNKS) { + av_log(h->avctx, AV_LOG_ERROR, + "Decoding in chunks is not supported for " + "partitioned slices.\n"); + return AVERROR(ENOSYS); + } + init_get_bits(&hx->gb, ptr, bit_length); hx->intra_gb_ptr = hx->inter_gb_ptr = NULL; @@ -5153,6 +5159,9 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data, int ret; h->flags = avctx->flags; + /* reset data partitioning here, to ensure GetBitContexts from previous + * packets do not get used. */ + h->data_partitioning = 0; /* end of stream, output what is still in the buffers */ if (buf_size == 0) { |