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

Michael Niedermayer michaelni
Mon Nov 5 21:41:06 CET 2007


On Mon, Nov 05, 2007 at 12:21:33PM -0800, Ronald S. Bultje wrote:
> Hi,
> 
> as per $subj, this patch splits out the MDPR chunk reading into a new
> function. This is useful because the RDT SDP data contains a MDPR chunk
> which can be used to initialize single stream parsing contexts, which is
> used later for packet parsing.

[...]
> +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

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

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- 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/3227d192/attachment.pgp>



More information about the ffmpeg-devel mailing list