[FFmpeg-devel] [PATCH] lavc/bitstream_filter: do not crash in case the argument of av_bitstream_filter_close() is NULL

Stefano Sabatini stefasab at gmail.com
Thu Jul 4 19:31:58 CEST 2013


TODO: bump micro
---
 libavcodec/bitstream_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c
index dd10531..e562555 100644
--- a/libavcodec/bitstream_filter.c
+++ b/libavcodec/bitstream_filter.c
@@ -53,6 +53,8 @@ AVBitStreamFilterContext *av_bitstream_filter_init(const char *name){
 }
 
 void av_bitstream_filter_close(AVBitStreamFilterContext *bsfc){
+    if (!bsfc)
+        return;
     if(bsfc->filter->close)
         bsfc->filter->close(bsfc);
     av_freep(&bsfc->priv_data);
-- 
1.8.1.2



More information about the ffmpeg-devel mailing list