aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-03 01:47:50 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-03 01:47:53 +0200
commitd076ee521647d9851c92840ec9eb82d4e0dedac9 (patch)
tree09f72c92a44cc2fe7b3865ca9619d645ae5bb2a9
parent8d32735629321873ed2d4993b1b0a2a037aca29e (diff)
parent27ac9585c97d35b809382be5634c8e5f7211243a (diff)
downloadffmpeg-d076ee521647d9851c92840ec9eb82d4e0dedac9.tar.gz
Merge commit '27ac9585c97d35b809382be5634c8e5f7211243a' into release/0.10
* commit '27ac9585c97d35b809382be5634c8e5f7211243a': h264: reset data partitioning at the beginning of each decode call Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b7a7c49992..7575bfd551 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4051,6 +4051,13 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
}
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;
@@ -4187,6 +4194,9 @@ static int decode_frame(AVCodecContext *avctx,
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) {