[FFmpeg-devel] [PATCH 1/6] rmdec.c: ff_rm_read_mdpr_codecdata()
Benoit Fouet
benoit.fouet
Tue Nov 6 11:32:16 CET 2007
Hi Ronald,
Ronald S. Bultje wrote:
> Hi,
>
> On 11/5/07, Michael Niedermayer <michaelni at gmx.at> wrote:
>
>>> +static int
>>> +ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVStream *st)
>>> +{
>>> + ByteIOContext *pb = &s->pb;
>>> + RMContext *rm = s->priv_data;
>>> + unsigned int v;
>>> + int codec_data_size, size, res = -1;
>>> + int64_t codec_pos;
>>> +
>>> + codec_data_size = get_be32(pb);
>>> + codec_pos = url_ftell(pb);
>>> + v = get_be32(pb);
>>> + if (v == MKTAG(0xfd, 'a', 'r', '.')) {
>>> + /* ra type header */
>>> + if (rm_read_audio_stream_info(s, st, 0))
>>> + goto fail;
>>>
>> this has been changed from return -1
>>
>>
>> [...]
>>
>>> + if(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE <=
>>>
>> (unsigned)st->codec->extradata_size){
>>
>>> + //check is redundant as get_buffer() will catch this
>>> + av_log(s, AV_LOG_ERROR, "st->codec->extradata_size too
>>>
>> large\n");
>>
>>> + goto fail;
>>>
>> this as well
>>
>> so this patch is not just a split out it changes behavior
>>
>
>
> I'm not sure why I did that, and it doesn't appear necessary. Attached is a
> new patch w/o that. Also, the goto label in fail has been reverted to skip,
> which is what it was before.
>
>
this patch generates the following warnings:
rmdec.c: In function ?ff_rm_read_mdpr_codecdata?:
rmdec.c:195: warning: unused variable ?rm?
rmdec.c: In function ?rm_read_header?:
rmdec.c:279: warning: unused variable ?size?
--
Ben
Purple Labs S.A.
www.purplelabs.com
More information about the ffmpeg-devel
mailing list