[FFmpeg-devel] [PATCH] Add IFF metadata handling

Sebastian Vater cdgs.basty
Mon May 3 15:59:37 CEST 2010


Vladimir Pantelic a ?crit :
> Sebastian Vater wrote:
>> Sebastian Vater a ?crit :
>
>>>  Oh yes, you're right. Fixed!
>>>
>>
>> Oops, just forgot a const...fixed!
>
> +static char *get_metadata(AVFormatContext *s,
> +                          const char *const tag,
> +                          const unsigned data_size)
> +{
> +    char *buf = av_malloc(data_size + 1);
> +    if (buf) {
> +        get_buffer(s->pb, buf, data_size);
> +        buf[data_size] = 0;
> +    }
> +    av_metadata_set2(&s->metadata, tag, buf,
> AV_METADATA_DONT_STRDUP_VAL);
> +
> +    return buf;
> +}
> +
>
> you call av_metadata_set2() on a buf that could be NULL?

Oh damn! Fixed!

-- 

Best regards,
                   :-) Basty/CDGS (-:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-metadata.patch
Type: text/x-diff
Size: 2309 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100503/f18741ed/attachment.patch>



More information about the ffmpeg-devel mailing list