[FFmpeg-cvslog] flvdec: Inject in stream extradata, into the stream.

Michael Niedermayer git at videolan.org
Fri Sep 23 06:04:01 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Sep 23 05:45:26 2011 +0200| [6d789f50d261e4c0c2a8b02edbb86fd77247322c] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d789f50d261e4c0c2a8b02edbb86fd77247322c
---

 libavformat/flvdec.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index ef487a6..74330e8 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) {



More information about the ffmpeg-cvslog mailing list