You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
doc/examples/transcode: set packet timebase for decoding
It is recommended for callers to set it, though not required.
This commit is contained in:
@@ -97,6 +97,11 @@ static int open_input_file(const char *filename)
|
|||||||
"for stream #%u\n", i);
|
"for stream #%u\n", i);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Inform the decoder about the timebase for the packet timestamps.
|
||||||
|
* This is highly recommended, but not mandatory. */
|
||||||
|
codec_ctx->pkt_timebase = stream->time_base;
|
||||||
|
|
||||||
/* Reencode video & audio and remux subtitles etc. */
|
/* Reencode video & audio and remux subtitles etc. */
|
||||||
if (codec_ctx->codec_type == AVMEDIA_TYPE_VIDEO
|
if (codec_ctx->codec_type == AVMEDIA_TYPE_VIDEO
|
||||||
|| codec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
|| codec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||||
|
Reference in New Issue
Block a user