mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-14 02:50:11 +01:00
lavf: Avoid using av_malloc(0) in av_dump_format
On OS X, av_malloc(0) returns pointers that cause crashes when freed. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -3333,7 +3333,7 @@ void av_dump_format(AVFormatContext *ic,
|
|||||||
int is_output)
|
int is_output)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uint8_t *printed = av_mallocz(ic->nb_streams);
|
uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL;
|
||||||
if (ic->nb_streams && !printed)
|
if (ic->nb_streams && !printed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user