Changes between Initial Version and Version 1 of Ticket #4899, comment 13


Ignore:
Timestamp:
Jan 2, 2016, 10:45:16 AM (11 years ago)
Author:
Roger Pack

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4899, comment 13

    initial v1  
    2020}}}
    2121
    22 reverting it in my own hackish manner and the leaks at least seem less, FWIW.
     22reverting it in my own hackish manner and the leaks at least seem less now, in case useful to anybody:
    2323
    2424{{{
    2525diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
    26 index fec4eca..02aec3a 100644
     26index 01604e5..783bcc9 100644
    2727--- a/libavcodec/mpegvideo_enc.c
    2828+++ b/libavcodec/mpegvideo_enc.c
    29 @@ -1617,7 +1617,8 @@ static void frame_end(MpegEncContext *s)
    30      if (s->pict_type!= AV_PICTURE_TYPE_B)
    31          s->last_non_b_pict_type = s->pict_type;
     29@@ -1673,7 +1673,8 @@ static void frame_end(MpegEncContext *s)
    3230 
     31 #if FF_API_CODED_FRAME
     32 FF_DISABLE_DEPRECATION_WARNINGS
    3333-    av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
    34 +//    av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
     34+    // disabled for now #4899 av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
    3535+    s->avctx->coded_frame = s->current_picture_ptr->f;
    36  }
    37  
    38  static void update_noise_reduction(MpegEncContext *s)
     36 FF_ENABLE_DEPRECATION_WARNINGS
     37 #endif
     38 #if FF_API_ERROR_FRAME
    3939diff --git a/libavcodec/utils.c b/libavcodec/utils.c
    40 index 3aa861a..6c1e88c 100644
     40index 19f3f0a..20b7db6 100644
    4141--- a/libavcodec/utils.c
    4242+++ b/libavcodec/utils.c
    43 @@ -2909,7 +2909,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
    44      av_freep(&avctx->priv_data);
    45      if (av_codec_is_encoder(avctx->codec)) {
     43@@ -2549,7 +2549,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
    4644         av_freep(&avctx->extradata);
     45 #if FF_API_CODED_FRAME
     46 FF_DISABLE_DEPRECATION_WARNINGS
    4747-        av_frame_free(&avctx->coded_frame);
    48 +        // disabled for now 4899 av_frame_free(&avctx->coded_frame);
     48+        // disabled for now #4899 av_frame_free(&avctx->coded_frame);
     49 FF_ENABLE_DEPRECATION_WARNINGS
     50 #endif
    4951     }
    50      avctx->codec = NULL;
    51      avctx->active_thread_type = 0;
    5252}}}