fftools/ffmpeg: rework -enc_time_base handling

Read the timebase from FrameData rather than the input stream. This
should fix #10393 and generally be more reliable.

Replace the use of '-1' to indicate demuxing timebase with the string
'demux'. Also allow to request filter timebase with
'-enc_time_base filter'.
This commit is contained in:
Anton Khirnov
2023-07-07 11:31:53 +02:00
parent 4d06742b93
commit dff3a283cd
5 changed files with 44 additions and 18 deletions

View File

@@ -56,6 +56,7 @@
#define FFMPEG_ROTATION_METADATA 1
#define FFMPEG_OPT_QPHIST 1
#define FFMPEG_OPT_ADRIFT_THRESHOLD 1
#define FFMPEG_OPT_ENC_TIME_BASE_NUM 1
enum VideoSyncMethod {
VSYNC_AUTO = -1,
@@ -66,6 +67,11 @@ enum VideoSyncMethod {
VSYNC_DROP,
};
enum EncTimeBase {
ENC_TIME_BASE_DEMUX = -1,
ENC_TIME_BASE_FILTER = -2,
};
#define MAX_STREAMS 1024 /* arbitrary sanity check value */
enum HWAccelID {