Skip to content

Instantly share code, notes, and snippets.

@BtbN
Created August 26, 2016 19:38
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/42f8f581149920dc28da1afe71310948 to your computer and use it in GitHub Desktop.
Save BtbN/42f8f581149920dc28da1afe71310948 to your computer and use it in GitHub Desktop.
stdin
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 87d7954..08f03b2 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1699,6 +1699,10 @@ no_output_pic:
static void frame_end(MpegEncContext *s)
{
+#if FF_API_CODED_FRAME
+ int tmp = 0;
+#endif
+
if (s->unrestricted_mv &&
s->current_picture.reference &&
!s->intra_only) {
@@ -1735,7 +1739,10 @@ static void frame_end(MpegEncContext *s)
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
+ tmp = s->current_picture.f->nb_side_data;
+ s->current_picture.f->nb_side_data = 0;
av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
+ s->current_picture.f->nb_side_data = tmp;
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