You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/vp3: factorize out free_tables()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -262,6 +262,20 @@ typedef struct Vp3DecodeContext {
|
|||||||
* VP3 specific functions
|
* VP3 specific functions
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
static av_cold void free_tables(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
Vp3DecodeContext *s = avctx->priv_data;
|
||||||
|
|
||||||
|
av_freep(&s->superblock_coding);
|
||||||
|
av_freep(&s->all_fragments);
|
||||||
|
av_freep(&s->coded_fragment_list[0]);
|
||||||
|
av_freep(&s->dct_tokens_base);
|
||||||
|
av_freep(&s->superblock_fragments);
|
||||||
|
av_freep(&s->macroblock_coding);
|
||||||
|
av_freep(&s->motion_val[0]);
|
||||||
|
av_freep(&s->motion_val[1]);
|
||||||
|
}
|
||||||
|
|
||||||
static void vp3_decode_flush(AVCodecContext *avctx)
|
static void vp3_decode_flush(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
Vp3DecodeContext *s = avctx->priv_data;
|
Vp3DecodeContext *s = avctx->priv_data;
|
||||||
@@ -279,14 +293,7 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
|
|||||||
Vp3DecodeContext *s = avctx->priv_data;
|
Vp3DecodeContext *s = avctx->priv_data;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
av_freep(&s->superblock_coding);
|
free_tables(avctx);
|
||||||
av_freep(&s->all_fragments);
|
|
||||||
av_freep(&s->coded_fragment_list[0]);
|
|
||||||
av_freep(&s->dct_tokens_base);
|
|
||||||
av_freep(&s->superblock_fragments);
|
|
||||||
av_freep(&s->macroblock_coding);
|
|
||||||
av_freep(&s->motion_val[0]);
|
|
||||||
av_freep(&s->motion_val[1]);
|
|
||||||
av_freep(&s->edge_emu_buffer);
|
av_freep(&s->edge_emu_buffer);
|
||||||
|
|
||||||
s->theora_tables = 0;
|
s->theora_tables = 0;
|
||||||
|
Reference in New Issue
Block a user