diff options
author | Martin Storsjö | 2011-09-30 20:30:35 +0300 |
---|---|---|
committer | Martin Storsjö | 2011-09-30 22:31:30 +0300 |
commit | e81e5e8ad2bb5746df0c343c396019aca165cf66 (patch) | |
tree | 06fd22c12fb0c58bc9e515404907304611ee3ade /libavformat | |
parent | bcb15554894e13d1575d5f6e7ff833812a315004 (diff) |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index d0ad3589b6..0ba6fc3cd9 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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; |