avcodec/libx264: Pass x264_picture_t* directly

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-03-12 23:27:57 +01:00
parent f456c192d9
commit df53d7a194
1 changed files with 2 additions and 5 deletions

View File

@ -311,11 +311,8 @@ static void reconfig_encoder(AVCodecContext *ctx, const AVFrame *frame)
}
}
static void free_picture(AVCodecContext *ctx)
static void free_picture(x264_picture_t *pic)
{
X264Context *x4 = ctx->priv_data;
x264_picture_t *pic = &x4->pic;
for (int i = 0; i < pic->extra_sei.num_payloads; i++)
av_free(pic->extra_sei.payloads[i].payload);
av_freep(&pic->extra_sei.payloads);
@ -554,7 +551,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
return 0;
fail:
free_picture(ctx);
free_picture(pic);
*ppic = NULL;
return ret;
}