fftools/ffmpeg: attach InputStream.dts to demuxed packets when needed

This way computing it and using it for streamcopy does not need to
happen in sync. Will be useful in following commits, where updating
InputStream.dts will be moved to the demuxing thread.
This commit is contained in:
Anton Khirnov
2023-04-27 13:54:36 +02:00
parent abf9532bda
commit 09c686788e
3 changed files with 28 additions and 2 deletions

View File

@@ -95,6 +95,12 @@ typedef struct {
} AudioChannelMap;
#endif
typedef struct DemuxPktData {
// estimated dts in AV_TIME_BASE_Q,
// to be used when real dts is missing
int64_t dts_est;
} DemuxPktData;
typedef struct OptionsContext {
OptionGroup *g;
@@ -337,6 +343,7 @@ typedef struct InputStream {
int discard; /* true if stream data should be discarded */
int user_set_discard;
int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */
int streamcopy_needed;
#define DECODING_FOR_OST 1
#define DECODING_FOR_FILTER 2
// should attach FrameData as opaque_ref after decoding