[FFmpeg-devel] [PATCH] libavformat/icecast.c Add Icecast protocol

Michael Niedermayer michaelni at gmx.at
Mon Aug 4 00:51:46 CEST 2014

On Mon, Aug 04, 2014 at 12:24:27AM +0200, Marvin Scholz wrote:
> >av_freep() should be safe to be used with NULL
> Since av_freep takes a pointer I am nearly sure that it doesn't, at
> least I remember that I had some issues without the if's… But please
> correct me if I'm wrong.

in the quoted code you pass the address of a pointer to av_freep()
the address of a pointer is never NULL.
The check checks if the pointer is NULL, which is passed to free()
POSIX, says about free() that
"If ptr is a null pointer, no action shall occur."


ill make sure this is explicitly mentioned for av_freep() and not
just av_free()

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140804/a9f95408/attachment.asc>

More information about the ffmpeg-devel mailing list