Skip to content
Snippets Groups Projects
Commit 145c250b authored by Tristan Matthews's avatar Tristan Matthews Committed by Steve Lhomme
Browse files

codec: rav1e: allocate timebase on stack

This is getting leaked and doesn't need to be dynamically allocated.
parent f18c7763
No related branches found
No related tags found
1 merge request!3111codec: rav1e: allocate timebase on stack
Pipeline #304483 passed with stage
in 39 minutes and 14 seconds
......@@ -178,17 +178,9 @@ static int OpenEncoder(vlc_object_t *this)
goto error;
}
RaRational *timebase = malloc(sizeof(RaRational));
if (timebase == NULL)
{
msg_Err(enc, "%s", "Unable to allocate timebase\n");
err = VLC_ENOMEM;
goto error;
}
RaRational timebase = { .num = enc->fmt_in.video.i_frame_rate_base, .den = enc->fmt_in.video.i_frame_rate };
timebase->num = enc->fmt_in.video.i_frame_rate_base;
timebase->den = enc->fmt_in.video.i_frame_rate;
rav1e_config_set_time_base(ra_config, *timebase);
rav1e_config_set_time_base(ra_config, timebase);
int tile_rows = var_InheritInteger(enc, SOUT_CFG_PREFIX "tile-rows");
int tile_columns = var_InheritInteger(enc, SOUT_CFG_PREFIX "tile-columns");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment