mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 01:21:06 +00:00
avcodec/nvenc: write AV1 timecode metadata in AV1 syntax
Fixes: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/20610
Tested on 5090 by claude
(cherry picked from commit afd059c340)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -2718,8 +2718,10 @@ static int prepare_sei_data_array(AVCodecContext *avctx, const AVFrame *frame)
|
||||
void *tc_data = NULL;
|
||||
size_t tc_size = 0;
|
||||
|
||||
if (ff_alloc_timecode_sei(frame, avctx->framerate, 0, &tc_data, &tc_size) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Not enough memory for timecode sei, skipping\n");
|
||||
if ((avctx->codec->id == AV_CODEC_ID_AV1 ?
|
||||
ff_alloc_timecode_metadata_av1(frame, avctx->framerate, &tc_data, &tc_size) :
|
||||
ff_alloc_timecode_sei(frame, avctx->framerate, 0, &tc_data, &tc_size)) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Not enough memory for timecode, skipping\n");
|
||||
}
|
||||
|
||||
if (tc_data) {
|
||||
|
||||
Reference in New Issue
Block a user