]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegvideo_enc.c
lavf/segment: fix writing separate header with auto BSF
[ffmpeg] / libavcodec / mpegvideo_enc.c
index 87d795478afdd1ab0e718b4a4f494a5cfaa5310b..1540e5c11dad2328432fd86fe64075a400b2a8d7 100644 (file)
@@ -1320,6 +1320,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
                                                 EDGE_BOTTOM);
                     }
                 }
+                emms_c();
             }
         }
         ret = av_frame_copy_props(pic->f, pic_arg);
@@ -1735,6 +1736,7 @@ static void frame_end(MpegEncContext *s)
 
 #if FF_API_CODED_FRAME
 FF_DISABLE_DEPRECATION_WARNINGS
+    av_frame_unref(s->avctx->coded_frame);
     av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
@@ -2911,6 +2913,8 @@ int ff_mpv_reallocate_putbitbuffer(MpegEncContext *s, size_t threshold, size_t s
             return AVERROR(ENOMEM);
         }
 
+        emms_c();
+
         av_fast_padded_malloc(&new_buffer, &new_buffer_size,
                               s->avctx->internal->byte_buffer_size + size_increase);
         if (!new_buffer)