1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avcodec/vp3: free tables before allocating new ones

Fixes memleak on seeking

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-06-03 17:09:17 +02:00
parent 90b26d63ba
commit a4ed51ab40

View File

@ -1662,6 +1662,8 @@ static av_cold int allocate_tables(AVCodecContext *avctx)
Vp3DecodeContext *s = avctx->priv_data; Vp3DecodeContext *s = avctx->priv_data;
int y_fragment_count, c_fragment_count; int y_fragment_count, c_fragment_count;
free_tables(avctx);
y_fragment_count = s->fragment_width[0] * s->fragment_height[0]; y_fragment_count = s->fragment_width[0] * s->fragment_height[0];
c_fragment_count = s->fragment_width[1] * s->fragment_height[1]; c_fragment_count = s->fragment_width[1] * s->fragment_height[1];