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) {
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to