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>
This commit is contained in:
Michael Niedermayer 2014-06-03 01:47:50 +02:00
commit d076ee5216

View File

@ -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) {