aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-06 00:54:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-06 00:54:03 +0000
commit3f05305d73aaf886051d0394466e4c50eb02da11 (patch)
tree3c0000bdbcebe22d534199c239742cc62ce772d1
parentf6d5112387204d881fcdc69efc4f590ff00acfcb (diff)
downloadffmpeg-3f05305d73aaf886051d0394466e4c50eb02da11.tar.gz
RV30/RV40 demuxing (untested)
Originally committed as revision 3809 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/avcodec.h5
-rw-r--r--libavformat/rm.c15
2 files changed, 15 insertions, 5 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index a8aa16e786..61b0d3f3b3 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -100,6 +100,9 @@ enum CodecID {
CODEC_ID_PGMYUV,
CODEC_ID_PAM,
CODEC_ID_FFVHUFF,
+ CODEC_ID_RV30,
+ CODEC_ID_RV40,
+
/* various pcm "codecs" */
CODEC_ID_PCM_S16LE= 0x10000,
@@ -1884,6 +1887,8 @@ extern AVCodec h263i_decoder;
extern AVCodec flv_decoder;
extern AVCodec rv10_decoder;
extern AVCodec rv20_decoder;
+extern AVCodec rv30_decoder;
+extern AVCodec rv40_decoder;
extern AVCodec svq1_decoder;
extern AVCodec svq3_decoder;
extern AVCodec dvvideo_decoder;
diff --git a/libavformat/rm.c b/libavformat/rm.c
index 54ffa028d8..f0529d0438 100644
--- a/libavformat/rm.c
+++ b/libavformat/rm.c
@@ -652,7 +652,9 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
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 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
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 */