diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-23 05:45:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-23 06:02:17 +0200 |
commit | 6d789f50d261e4c0c2a8b02edbb86fd77247322c (patch) | |
tree | 0ccaf857cd47c22fd5ffb87a0270b592a59c271d /libavformat/flvdec.c | |
parent | 9b73fbcff62267a355f752d83e26cd6d971e975e (diff) | |
download | ffmpeg-6d789f50d261e4c0c2a8b02edbb86fd77247322c.tar.gz |
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>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index ef487a694f..74330e8658 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -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) { |