flvdec: Inject in stream extradata, into the stream.

The code before was unsafe, had a race condition and could crash.
This Fixes Ticket499

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-09-23 05:45:26 +02:00
parent 9b73fbcff6
commit 6d789f50d2
1 changed files with 2 additions and 1 deletions

View File

@ -505,7 +505,8 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
if (flv->wrong_dts)
dts = AV_NOPTS_VALUE;
}
if (type == 0) {
if (type == 0 && !st->codec->extradata) {
if ((ret = flv_get_extradata(s, st, size)) < 0)
return ret;
if (st->codec->codec_id == CODEC_ID_AAC) {