[FFmpeg-cvslog] r24082 - trunk/libavformat/asfdec.c

michael subversion
Wed Jul 7 12:39:05 CEST 2010


Author: michael
Date: Wed Jul  7 12:39:05 2010
New Revision: 24082

Log:
Ignore extradata & w/h in asf/dvr.
The w/h values are wrong and extradata contains a fake seq header that causes
decoding to fail later, a valid seq header is in the stream itself.
Fixes issue658

Modified:
   trunk/libavformat/asfdec.c

Modified: trunk/libavformat/asfdec.c
==============================================================================
--- trunk/libavformat/asfdec.c	Wed Jul  7 12:36:26 2010	(r24081)
+++ trunk/libavformat/asfdec.c	Wed Jul  7 12:39:05 2010	(r24082)
@@ -396,8 +396,14 @@ static int asf_read_header(AVFormatConte
 
                 st->codec->codec_tag = tag1;
                 st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1);
-                if(tag1 == MKTAG('D', 'V', 'R', ' '))
+                if(tag1 == MKTAG('D', 'V', 'R', ' ')){
                     st->need_parsing = AVSTREAM_PARSE_FULL;
+                    // issue658 containse wrong w/h and MS even puts a fake seq header with wrong w/h in extradata while a correct one is in te stream. maximum lameness
+                    st->codec->width  =
+                    st->codec->height = 0;
+                    av_freep(&st->codec->extradata);
+                    st->codec->extradata_size=0;
+                }
                 if(st->codec->codec_id == CODEC_ID_H264)
                     st->need_parsing = AVSTREAM_PARSE_FULL_ONCE;
             }



More information about the ffmpeg-cvslog mailing list