]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/apetag.c
avcodec/avcodec: Perform sub_charenc/iconv checks before AVCodec.init()
[ffmpeg] / libavformat / apetag.c
index 4e19f49bf170fbc48cfff144781f03536b8be569..454c6c688bd2b0c7fde6eead30cd7799d1705a0c 100644 (file)
@@ -96,8 +96,8 @@ static int ape_tag_read_field(AVFormatContext *s)
             st->attached_pic.stream_index = st->index;
             st->attached_pic.flags       |= AV_PKT_FLAG_KEY;
         } else {
-            if (ff_get_extradata(s, st->codecpar, s->pb, size) < 0)
-                return AVERROR(ENOMEM);
+            if ((ret = ff_get_extradata(s, st->codecpar, s->pb, size)) < 0)
+                return ret;
             st->codecpar->codec_type = AVMEDIA_TYPE_ATTACHMENT;
         }
     } else {