[FFmpeg-devel] [PATCH] rmdec.c: Remove useless code

Ronald S. Bultje rsbultje
Tue May 18 18:49:35 CEST 2010


Hi,

On Tue, May 18, 2010 at 5:07 AM, Kostya <kostya.shishkov at gmail.com> wrote:
> On Tue, May 18, 2010 at 01:48:57AM +0800, Zhou Zongyi wrote:
>> This patch removes duplicate assignations in rmdec.c:
>>
>> Index: libavformat/rmdec.c
>> ===================================================================
>> --- libavformat/rmdec.c (revision 23147)
>> +++ libavformat/rmdec.c (working copy)
>> @@ -226,10 +226,6 @@
>> ? ? ? ? ? ? ? ? ?return -1;
>> ? ? ? ? ? ? ?}
>>
>> - ? ? ? ? ? ?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;
>> -
>> ? ? ? ? ? ? ?ast->audio_framesize = st->codec->block_align;
>> ? ? ? ? ? ? ?if (st->codec->codec_id == CODEC_ID_SIPR) {
>> ? ? ? ? ? ? ? ? ?if (flavor > 3) {
>> @@ -259,7 +255,6 @@
>> ? ? ? ? ? ? ?get_be16(pb); get_byte(pb);
>> ? ? ? ? ? ? ?if (version == 5)
>> ? ? ? ? ? ? ? ? ?get_byte(pb);
>> - ? ? ? ? ? ?st->codec->codec_id = CODEC_ID_AAC;
>> ? ? ? ? ? ? ?codecdata_length = get_be32(pb);
>> ? ? ? ? ? ? ?if(codecdata_length + FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)codecdata_length){
>> ? ? ? ? ? ? ? ? ?av_log(s, AV_LOG_ERROR, "codecdata_length too large\n");
>
> Indeed, it may not be needed since I borrowed some ideas from FFmBC
> demuxer. Ronald?

Yes, patch OK with me.

Ronald



More information about the ffmpeg-devel mailing list