Commit e81e5e8a authored by Martin Storsjö's avatar Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent bcb15554
......@@ -3333,7 +3333,7 @@ void av_dump_format(AVFormatContext *ic,
int is_output)
{
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)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment