avformat/utils: Do not ignore failure in extract_extradata_init()
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 26 Sep 2018 22:00:24 +0000 (00:00 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 7 Oct 2018 01:03:09 +0000 (03:03 +0200)
We check for the documented explanation of the "Ignore code" in extract_extradata_check() already

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/utils.c

index c973a7e..7e5783c 100644 (file)
@@ -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;