summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-07-07 10:39:05 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-07-07 10:39:05 +0000
commit31247669593e5bf6571192f5e8888ccabd050ec8 (patch)
treea9d36d6dd447cc1ff77f92cd650e1da9c8b55cbd
parent69b56ed7a6215a077bc557d0e98f709d2959f473 (diff)
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. Partially fixes issue658 Originally committed as revision 24082 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/asfdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 297383f64d..17b203382c 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -396,8 +396,14 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
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;
}