diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-12-31 09:12:53 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-01-03 19:50:22 -0800 |
commit | 400ba1d735ada65c56b1804bcc002a5cd479433b (patch) | |
tree | 9ab9c0b47bf812c067cd6acd837684032aa436d4 /libavcodec | |
parent | 54e68fb3b89247084dfaeb3697a18f8ba92c5ea5 (diff) | |
download | ffmpeg-400ba1d735ada65c56b1804bcc002a5cd479433b.tar.gz |
h264: return index in buffer on end-of-sequence.
Fixes hangs if the last packet contains an end-of-sequence NAL unit,
bug 158.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index bb7619dee2..9502a7c147 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -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); |