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

Luca Barbato git at videolan.org
Sun Jul 7 11:53:10 CEST 2013


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Jun 24 18:12:24 2013 +0200| [f5e646a00ac21e500dae4bcceded790a0fbc5246] | 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

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

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

diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 23b662d..8b92746 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -472,6 +472,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