changeset 593:a1f354e84965 libavformat

skip unknown streams instead of failing
author michael
date Fri, 19 Nov 2004 18:16:36 +0000
parents f28e99a6ac99
children 89a09ede50ad
files rm.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rm.c	Fri Nov 19 16:36:30 2004 +0000
+++ b/rm.c	Fri Nov 19 18:16:36 2004 +0000
@@ -627,6 +627,7 @@
             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 @@
                 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 @@
                 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);