mirror of https://git.ffmpeg.org/ffmpeg.git
h264: Return the correct number of bytes for mid strea, extradata.
Fixes the hang with Ticket952 Tested-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
146ef3f37c
commit
e4a714f65a
|
@ -1125,7 +1125,7 @@ int ff_h264_decode_extradata(H264Context *h, const uint8_t *buf, int size)
|
||||||
if(decode_nal_units(h, buf, size) < 0)
|
if(decode_nal_units(h, buf, size) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
av_cold int ff_h264_decode_init(AVCodecContext *avctx){
|
av_cold int ff_h264_decode_init(AVCodecContext *avctx){
|
||||||
|
@ -1170,7 +1170,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx){
|
||||||
}
|
}
|
||||||
|
|
||||||
if(avctx->extradata_size > 0 && avctx->extradata &&
|
if(avctx->extradata_size > 0 && avctx->extradata &&
|
||||||
ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size))
|
ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size)<0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames < h->sps.num_reorder_frames){
|
if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames < h->sps.num_reorder_frames){
|
||||||
|
|
Loading…
Reference in New Issue