[SCM] libav/experimental: skip unknown streams instead of failing
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 15:42:13 UTC 2013
The following commit has been merged in the experimental branch:
commit f7ff7bc6484d4e45a50e38119826f99318fd5bfb
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Fri Nov 19 18:16:36 2004 +0000
skip unknown streams instead of failing
Originally committed as revision 3693 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/rm.c b/libavformat/rm.c
index 4e0ca28..0b280e9 100644
--- a/libavformat/rm.c
+++ b/libavformat/rm.c
@@ -627,6 +627,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_str8(pb, buf, sizeof(buf)); /* mimetype */
codec_data_size = get_be32(pb);
codec_pos = url_ftell(pb);
+ st->codec.codec_type = CODEC_TYPE_DATA;
v = get_be32(pb);
if (v == MKTAG(0xfd, 'a', 'r', '.')) {
@@ -636,9 +637,10 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (get_le32(pb) != MKTAG('V', 'I', 'D', 'O')) {
fail1:
av_log(&st->codec, AV_LOG_ERROR, "Unsupported video codec\n");
- goto fail;
+ goto skip;
}
st->codec.codec_tag = get_le32(pb);
+// av_log(NULL, AV_LOG_DEBUG, "%X %X\n", st->codec.codec_tag, MKTAG('R', 'V', '2', '0'));
if ( st->codec.codec_tag != MKTAG('R', 'V', '1', '0')
&& st->codec.codec_tag != MKTAG('R', 'V', '2', '0'))
goto fail1;
@@ -659,6 +661,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
else
st->codec.codec_id = CODEC_ID_RV20;
}
+skip:
/* skip codec info */
size = url_ftell(pb) - codec_pos;
url_fskip(pb, codec_data_size - size);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list