diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-11-19 18:16:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-11-19 18:16:36 +0000 |
commit | f7ff7bc6484d4e45a50e38119826f99318fd5bfb (patch) | |
tree | 530e94c9acd6aa5f252d054cb0c60f93f4ae6c32 /libavformat/rm.c | |
parent | 35ef76b51c034ce91097b803ed930a58833f9db8 (diff) | |
download | ffmpeg-f7ff7bc6484d4e45a50e38119826f99318fd5bfb.tar.gz |
skip unknown streams instead of failing
Originally committed as revision 3693 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rm.c')
-rw-r--r-- | libavformat/rm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/rm.c b/libavformat/rm.c index 4e0ca2845e..0b280e9e9d 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); |