[FFmpeg-devel] [PATCH 1/3] avformat/utils: Do not ignore failure in extract_extradata_init()

Michael Niedermayer michael at niedermayer.cc
Thu Sep 27 01:00:24 EEST 2018


We check for the documented explanation of the "Ignore code" in extract_extradata_check() already

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/utils.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index c973a7e0c5..7e5783c14c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3489,13 +3489,9 @@ static int extract_extradata_init(AVStream *st)
 
     i->extract_extradata.bsf->time_base_in = st->time_base;
 
-    /* if init fails here, we assume extracting extradata is just not
-     * supported for this codec, so we return success */
     ret = av_bsf_init(i->extract_extradata.bsf);
-    if (ret < 0) {
-        av_bsf_free(&i->extract_extradata.bsf);
-        ret = 0;
-    }
+    if (ret < 0)
+        goto fail;
 
 finish:
     i->extract_extradata.inited = 1;
-- 
2.19.0



More information about the ffmpeg-devel mailing list