mirror of https://git.ffmpeg.org/ffmpeg.git
h264: unref leaking error recovery picture
This leaked a frame on each avcodec_flush_buffers() call, if frame threading was enabled. It caused severe memory usage in player if you were seeking a lot. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f9a5a89bbf
commit
e0e33ebe6b
|
@ -529,6 +529,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
|
||||||
|
|
||||||
av_freep(&h->rbsp_buffer[0]);
|
av_freep(&h->rbsp_buffer[0]);
|
||||||
av_freep(&h->rbsp_buffer[1]);
|
av_freep(&h->rbsp_buffer[1]);
|
||||||
|
ff_h264_unref_picture(h, &h->last_pic_for_ec);
|
||||||
memcpy(h, h1, offsetof(H264Context, intra_pcm_ptr));
|
memcpy(h, h1, offsetof(H264Context, intra_pcm_ptr));
|
||||||
memcpy(&h->cabac, &h1->cabac,
|
memcpy(&h->cabac, &h1->cabac,
|
||||||
sizeof(H264Context) - offsetof(H264Context, cabac));
|
sizeof(H264Context) - offsetof(H264Context, cabac));
|
||||||
|
|
Loading…
Reference in New Issue