mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
skip unknown streams instead of failing
Originally committed as revision 3693 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
35ef76b51c
commit
f7ff7bc648
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user