[FFmpeg-cvslog] wtv: Mark attachment with a negative stream id

Luca Barbato git at videolan.org
Tue Aug 27 16:39:00 CEST 2013


ffmpeg | branch: release/1.1 | Luca Barbato <lu_zero at gentoo.org> | Mon Jun 24 18:12:24 2013 +0200| [fa6eef4210c2fd7f7324d558b09311c75987a31e] | committer: Luca Barbato

wtv: Mark attachment with a negative stream id

A sid 0 would be mismatched to the attachment.

Prevent NULL pointer dereference.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit f5e646a00ac21e500dae4bcceded790a0fbc5246)

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 libavformat/wtv.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 2e5d39c..1811e46 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -502,6 +502,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
     st->codec->codec_id   = AV_CODEC_ID_MJPEG;
     st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
     st->codec->extradata  = av_mallocz(filesize);
+    st->id = -1;
     if (!st->codec->extradata)
         goto done;
     st->codec->extradata_size = filesize;



More information about the ffmpeg-cvslog mailing list