Commit 400ba1d7 authored by Ronald S. Bultje's avatar Ronald S. Bultje

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

Fixes hangs if the last packet contains an end-of-sequence NAL unit,
bug 158.
parent 54e68fb3
...@@ -4008,7 +4008,7 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -4008,7 +4008,7 @@ static int decode_frame(AVCodecContext *avctx,
H264Context *h = avctx->priv_data; H264Context *h = avctx->priv_data;
MpegEncContext *s = &h->s; MpegEncContext *s = &h->s;
AVFrame *pict = data; AVFrame *pict = data;
int buf_index; int buf_index = 0;
s->flags= avctx->flags; s->flags= avctx->flags;
s->flags2= avctx->flags2; s->flags2= avctx->flags2;
...@@ -4038,7 +4038,7 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -4038,7 +4038,7 @@ static int decode_frame(AVCodecContext *avctx,
*pict= *(AVFrame*)out; *pict= *(AVFrame*)out;
} }
return 0; return buf_index;
} }
buf_index=decode_nal_units(h, buf, buf_size); buf_index=decode_nal_units(h, buf, buf_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment