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

Michael Niedermayer michaelni
Mon Nov 5 23:58:30 CET 2007


Hi

On Mon, Nov 05, 2007 at 01:11:09PM -0800, 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.

looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071105/86099fc3/attachment.pgp>



More information about the ffmpeg-devel mailing list