On 3/21/2021 2:08 PM, James Almer wrote:
diff --git a/libavformat/options.c b/libavformat/options.c
index 07403b533e..bd4056caa1 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -220,11 +220,21 @@ AVFormatContext *avformat_alloc_context(void)
          av_free(ic);
          return NULL;
      }
+#if !FF_API_INIT_PACKET
+    ic->attached_pic = av_packet_alloc();
+#endif
      internal->pkt = av_packet_alloc();
      internal->parse_pkt = av_packet_alloc();
-    if (!internal->pkt || !internal->parse_pkt) {
+    if (!internal->pkt || !internal->parse_pkt
+#if !FF_API_INIT_PACKET
+        || !ic->attached_pic
+#endif
+    ) {
          av_packet_free(&internal->pkt);
          av_packet_free(&internal->parse_pkt);
+#if !FF_API_INIT_PACKET
+        av_packet_free(&ic->attached_pic);
+#endif
          av_free(internal);
          av_free(ic);
          return NULL;

Disregard this patch, since this chunk obviously does not compile. Not sure why i didn't notice it.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to