[SCM] libav/experimental: Support wb00+dc00 chunk mix. fixes issue402
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:17:51 UTC 2013
The following commit has been merged in the experimental branch:
commit 41757171e77feeb6e06a35e5bdeba09b44d90743
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Thu Mar 27 20:58:01 2008 +0000
Support wb00+dc00 chunk mix.
fixes issue402
Originally committed as revision 12609 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index e338ddb..b45641e 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -778,10 +778,29 @@ resync:
//parse ##dc/##wb
if(n < s->nb_streams){
AVStream *st;
+ AVStream *st1 = s->streams[1];
+ AVIStream *ast1= st1->priv_data;
AVIStream *ast;
st = s->streams[n];
ast = st->priv_data;
+
+ //workaround for broken small-file-bug402.avi
+ if( d[2] == 'w' && d[3] == 'b'
+ && n==0
+ && s->nb_streams>=2
+ && st ->codec->codec_type == CODEC_TYPE_VIDEO
+ && st1->codec->codec_type == CODEC_TYPE_AUDIO
+ && ast->prefix == 'd'*256+'c'
+ && (d[2]*256+d[3] == ast1->prefix || !ast1->prefix_count)
+ ){
+ n=1;
+ st = st1;
+ ast = ast1;
+ av_log(s, AV_LOG_WARNING, "Invalid stream+prefix combination, assuming audio\n");
+ }
+
+
if( (st->discard >= AVDISCARD_DEFAULT && size==0)
/*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & PKT_FLAG_KEY))*/ //FIXME needs a little reordering
|| st->discard >= AVDISCARD_ALL){
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list