changeset 638:5188094c6ec4 libavformat

RV30/RV40 demuxing (untested)
author michael
date Thu, 06 Jan 2005 00:54:03 +0000
parents 76e36d97a27a
children 0b52743104ac
files rm.c
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rm.c	Tue Jan 04 18:32:38 2005 +0000
+++ b/rm.c	Thu Jan 06 00:54:03 2005 +0000
@@ -652,7 +652,9 @@
                 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'))
+                    && st->codec.codec_tag != MKTAG('R', 'V', '2', '0')
+                    && st->codec.codec_tag != MKTAG('R', 'V', '3', '0')
+                    && st->codec.codec_tag != MKTAG('R', 'V', '4', '0'))
                     goto fail1;
                 st->codec.width = get_be16(pb);
                 st->codec.height = get_be16(pb);
@@ -676,10 +678,13 @@
                 h263_hack_version = bswap_32(((uint32_t*)st->codec.extradata)[1]);
 #endif
                 st->codec.sub_id = h263_hack_version;
-                if((h263_hack_version>>28)==1)
-                    st->codec.codec_id = CODEC_ID_RV10;
-                else
-                    st->codec.codec_id = CODEC_ID_RV20;
+                switch((h263_hack_version>>28)){
+                case 1: st->codec.codec_id = CODEC_ID_RV10; break;
+                case 2: st->codec.codec_id = CODEC_ID_RV20; break;
+                case 3: st->codec.codec_id = CODEC_ID_RV30; break;
+                case 4: st->codec.codec_id = CODEC_ID_RV40; break;
+                default: goto fail1;
+                }
             }
 skip:
             /* skip codec info */