[FFmpeg-devel] [PATCH 1/6] rmdec.c: ff_rm_read_mdpr_codecdata()

Ronald S. Bultje rsbultje
Mon Nov 5 22:11:09 CET 2007


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.

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rmdec-parse_mdpr.patch
Type: application/octet-stream
Size: 6524 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071105/1ef79753/attachment.obj>



More information about the ffmpeg-devel mailing list