[FFmpeg-devel] [PATCH 1/3] doc/examples/transcode: set packet timebase for decoding
James Almer
jamrial at gmail.com
Wed May 31 22:02:13 EEST 2023
On 5/31/2023 12:32 PM, Anton Khirnov wrote:
> It is recommended for callers to set it, though not required.
Add this comment to the file. It's meant to be an example for library
users to refer to for their implementations, after all.
> ---
> 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) {
More information about the ffmpeg-devel
mailing list