Skip to content

Instantly share code, notes, and snippets.

@BtbN
Created August 26, 2016 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BtbN/d06a87934870c984246d23dde353bc29 to your computer and use it in GitHub Desktop.
Save BtbN/d06a87934870c984246d23dde353bc29 to your computer and use it in GitHub Desktop.
stdin
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 87d7954..2233921 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1736,6 +1736,8 @@ static void frame_end(MpegEncContext *s)
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
+ av_freep(&s->avctx->coded_frame->side_data);
+ s->avctx->coded_frame->nb_side_data = 0;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
#if FF_API_ERROR_FRAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment