Browse Source

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>
tags/n0.9
Michael Niedermayer 14 years ago
parent
commit
6d789f50d2
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/flvdec.c

+ 2
- 1
libavformat/flvdec.c 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) {


Loading…
Cancel
Save