On 23/02/15 12:23, Andreas Cadhalpun wrote:
On 23.02.2015 01:56, Michael Niedermayer wrote:
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -317,7 +317,9 @@ static int a64multi_encode_frame(AVCodecContext
*avctx, AVPacket *pkt,
      } else {
          /* fill up mc_meta_charset with data until lifetime exceeds */
          if (c->mc_frame_counter < c->mc_lifetime) {
-            *p = *pict;
+            ret = av_frame_ref(p, pict);
+            if (ret < 0)
+                return ret;

I suspect this leaves a memleak, ill push it anyway as it allows
regression testing the more complex subsequent fix

Yes, this trades the crash for a memleak. :-/
Your simplification [1] fixes that.


coded_frame should be always allocated if I remember correctly and a cursory git grep tells me that.

lu

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to