Mercurial > libavformat.hg
changeset 3945:4928ebaaf2bd libavformat
add ok parts to the rm demuxer for SIPRO support
author | banan |
---|---|
date | Fri, 26 Sep 2008 12:12:25 +0000 |
parents | 7141e56c9f69 |
children | 624979ace06c |
files | rmdec.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rmdec.c Fri Sep 26 10:59:42 2008 +0000 +++ b/rmdec.c Fri Sep 26 12:12:25 2008 +0000 @@ -127,7 +127,7 @@ } rm->audiobuf = av_malloc(rm->audio_framesize * sub_packet_h); - } else if ((!strcmp(buf, "cook")) || (!strcmp(buf, "atrc"))) { + } else if ((!strcmp(buf, "cook")) || (!strcmp(buf, "atrc")) || (!strcmp(buf, "sipr"))) { int codecdata_length, i; get_be16(pb); get_byte(pb); if (((version >> 16) & 0xff) == 5) @@ -139,6 +139,7 @@ } if (!strcmp(buf, "cook")) st->codec->codec_id = CODEC_ID_COOK; + else if (!strcmp(buf, "sipr")) st->codec->codec_id = CODEC_ID_SIPR; else st->codec->codec_id = CODEC_ID_ATRAC3; st->codec->extradata_size= codecdata_length; st->codec->extradata= av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); @@ -557,7 +558,8 @@ } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) { if ((st->codec->codec_id == CODEC_ID_RA_288) || (st->codec->codec_id == CODEC_ID_COOK) || - (st->codec->codec_id == CODEC_ID_ATRAC3)) { + (st->codec->codec_id == CODEC_ID_ATRAC3) || + (st->codec->codec_id == CODEC_ID_SIPR)) { int x; int sps = rm->sub_packet_size; int cfs = rm->coded_framesize;