mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avcodec: use av_frame_free() for coded_frame
This commit is contained in:
parent
cb39fe9336
commit
546d69eb43
@ -99,7 +99,7 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int avui_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
|
||||
fail:
|
||||
opj_image_destroy(ctx->image);
|
||||
ctx->image = NULL;
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -605,7 +605,7 @@ static av_cold int libopenjpeg_encode_close(AVCodecContext *avctx)
|
||||
|
||||
opj_image_destroy(ctx->image);
|
||||
ctx->image = NULL;
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ static av_cold int encode_close(AVCodecContext* avc_context)
|
||||
|
||||
th_encode_free(h->t_state);
|
||||
av_freep(&h->stats);
|
||||
av_freep(&avc_context->coded_frame);
|
||||
av_frame_free(&avc_context->coded_frame);
|
||||
av_freep(&avc_context->stats_out);
|
||||
av_freep(&avc_context->extradata);
|
||||
avc_context->extradata_size = 0;
|
||||
|
@ -209,7 +209,7 @@ static av_cold int utvideo_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
UtVideoContext *utv = (UtVideoContext *)avctx->priv_data;
|
||||
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
av_freep(&avctx->extradata);
|
||||
av_freep(&utv->buffer);
|
||||
|
||||
|
@ -253,7 +253,7 @@ static av_cold int vp8_free(AVCodecContext *avctx)
|
||||
if (ctx->is_alpha)
|
||||
vpx_codec_destroy(&ctx->encoder_alpha);
|
||||
av_freep(&ctx->twopass_stats.buf);
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
av_freep(&avctx->stats_out);
|
||||
free_frame_list(ctx->coded_frame_list);
|
||||
return 0;
|
||||
|
@ -601,7 +601,7 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
|
||||
static av_cold int prores_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
ProresContext* ctx = avctx->priv_data;
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
av_freep(&ctx->fill_y);
|
||||
|
||||
return 0;
|
||||
|
@ -80,7 +80,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ static av_cold int utvideo_encode_close(AVCodecContext *avctx)
|
||||
UtvideoContext *c = avctx->priv_data;
|
||||
int i;
|
||||
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
av_freep(&c->slice_bits);
|
||||
for (i = 0; i < 4; i++)
|
||||
av_freep(&c->slice_buffer[i]);
|
||||
|
@ -215,7 +215,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ static int v308_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int v308_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ static int v408_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int v408_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ static int v410_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int v410_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ static int xface_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int xface_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ static int y41p_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int y41p_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ static int yuv4_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
static av_cold int yuv4_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
av_freep(&avctx->coded_frame);
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user