diff options
author | Martin Storsjö <martin@martin.st> | 2012-02-08 15:01:13 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-02-09 23:13:50 +0200 |
commit | e7d4a2a721ae863488f6a3814f9dcdbc6e8f5166 (patch) | |
tree | 411814b3c018f8dec7b85be33a8efd74fc47b886 /libavcodec | |
parent | c57fe49da8feda7d2e6c266978250a15a83e0484 (diff) | |
download | ffmpeg-e7d4a2a721ae863488f6a3814f9dcdbc6e8f5166.tar.gz |
libavcodec: Don't do av_free(av_malloc(0)) for bitstream filters
This fixes crashes on exit when closing a bitstream filter that
hasn't allocated any private data, on OS X.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/bitstream_filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c index b803ca4ef9..ee56174b2c 100644 --- a/libavcodec/bitstream_filter.c +++ b/libavcodec/bitstream_filter.c @@ -39,7 +39,7 @@ AVBitStreamFilterContext *av_bitstream_filter_init(const char *name){ if(!strcmp(name, bsf->name)){ AVBitStreamFilterContext *bsfc= av_mallocz(sizeof(AVBitStreamFilterContext)); bsfc->filter= bsf; - bsfc->priv_data= av_mallocz(bsf->priv_data_size); + bsfc->priv_data = bsf->priv_data_size ? av_mallocz(bsf->priv_data_size) : NULL; return bsfc; } bsf= bsf->next; |