[FFmpeg-devel] [PATCH 1/3] doc/examples/transcode: set packet timebase for decoding
Anton Khirnov
anton at khirnov.net
Wed May 31 18:32:03 EEST 2023
It is recommended for callers to set it, though not required.
---
doc/examples/transcode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/examples/transcode.c b/doc/examples/transcode.c
index 805a028ed7..7110816fe6 100644
--- a/doc/examples/transcode.c
+++ b/doc/examples/transcode.c
@@ -97,6 +97,9 @@ static int open_input_file(const char *filename)
"for stream #%u\n", i);
return ret;
}
+
+ codec_ctx->pkt_timebase = stream->time_base;
+
/* Reencode video & audio and remux subtitles etc. */
if (codec_ctx->codec_type == AVMEDIA_TYPE_VIDEO
|| codec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
--
2.40.1
More information about the ffmpeg-devel
mailing list