[FFmpeg-devel] [PATCH 07/13] lavf/id3v2: do not export empty fields.

Michael Niedermayer michaelni at gmx.at
Mon May 14 00:03:02 CEST 2012


On Sat, May 12, 2012 at 11:15:29PM +0200, Clément Bœsch wrote:
> This also avoids a memleak.
> ---
>  libavformat/id3v2.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
> index 1352b57..97a23c4 100644
> --- a/libavformat/id3v2.c
> +++ b/libavformat/id3v2.c
> @@ -303,6 +303,8 @@ static void read_ttag(AVFormatContext *s, AVIOContext *pb, int taglen, const cha
>      }
>      else if (*dst)
>          dict_flags |= AV_DICT_DONT_STRDUP_VAL;
> +    else
> +        av_freep(&dst);

probably ok

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

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120514/e879217f/attachment.asc>


More information about the ffmpeg-devel mailing list