1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

h264: return index in buffer on end-of-sequence.

Fixes hangs if the last packet contains an end-of-sequence NAL unit,
bug 158.
This commit is contained in:
Ronald S. Bultje 2011-12-31 09:12:53 -08:00
parent 54e68fb3b8
commit 400ba1d735

View File

@ -4008,7 +4008,7 @@ static int decode_frame(AVCodecContext *avctx,
H264Context *h = avctx->priv_data;
MpegEncContext *s = &h->s;
AVFrame *pict = data;
int buf_index;
int buf_index = 0;
s->flags= avctx->flags;
s->flags2= avctx->flags2;
@ -4038,7 +4038,7 @@ static int decode_frame(AVCodecContext *avctx,
*pict= *(AVFrame*)out;
}
return 0;
return buf_index;
}
buf_index=decode_nal_units(h, buf, buf_size);