Commit Graph

169 Commits

Author SHA1 Message Date
Anton Khirnov 0fcea80b2a fftools/ffmpeg: replace InputStream.file_index by a pointer
Reduces the need to use the input_files global array.
2023-12-14 20:16:53 +01:00
Anton Khirnov 9d7000b1be fftools/ffmpeg: attach wallclock timing information to packets and frames
Will become useful in following commits.
2023-12-14 08:11:05 +01:00
Anton Khirnov c9f38210fc fftools/ffmpeg: merge DemuxPktData into FrameData
This way we can propagate arbitrary data from the demuxer all the way
into the muxer, using a single struct.
2023-12-14 08:11:05 +01:00
Anton Khirnov d119ae2fd8 fftools/ffmpeg: convert to a threaded architecture
Change the main loop and every component (demuxers, decoders, filters,
encoders, muxers) to use the previously added transcode scheduler. Every
instance of every such component was already running in a separate
thread, but now they can actually run in parallel.

Changes the results of ffmpeg-fix_sub_duration_heartbeat - tested by
JEEB to be more correct and deterministic.
2023-12-12 08:24:18 +01:00
Anton Khirnov 9b8cc36ce0 fftools/ffmpeg: add thread-aware transcode scheduling infrastructure
See the comment block at the top of fftools/ffmpeg_sched.h for more
details on what this scheduler is for.

This commit adds the scheduling code itself, along with minimal
integration with the rest of the program:
* allocating and freeing the scheduler
* passing it throughout the call stack in order to register the
  individual components (demuxers/decoders/filtergraphs/encoders/muxers)
  with the scheduler

The scheduler is not actually used as of this commit, so it should not
result in any change in behavior. That will change in future commits.
2023-12-12 08:24:18 +01:00
Anton Khirnov 66e78e9680 fftools/ffmpeg_demux: switch from AVThreadMessageQueue to ThreadQueue
* the code is made shorter and simpler
* avoids constantly allocating and freeing AVPackets, thanks to
  ThreadQueue integration with ObjPool
* is consistent with decoding/filtering/muxing
* reduces the diff in the future switch to thread-aware scheduling

This makes ifile_get_packet() always block. Any potential issues caused
by this will be resolved by the switch to thread-aware scheduling in
future commits.
2023-12-12 08:24:18 +01:00
Anton Khirnov 889a022cce fftools/ffmpeg: rework keeping track of file duration for -stream_loop
Current code tracks min/max pts for each stream separately; then when
the file ends it combines them with last frame's duration to compute the
total duration of each stream; finally it selects the longest of those
durations as the file duration.

This is incorrect - the total file duration is the largest timestamp
difference between any frames, regardless of the stream.

Also change the way the last frame information is reported from decoders
to the muxer - previously it would be just the last frame's duration,
now the end timestamp is sent, which is simpler.

Changes the result of the fate-ffmpeg-streamloop-transcode-av test,
where the timestamps are shifted slightly forward. Note that the
matroska demuxer does not return the first audio packet after seeking
(due to buggy interaction betwen the generic code and the demuxer), so
there is a gap in audio.
2023-11-14 18:18:26 +01:00
Anton Khirnov 7c97a0c63f fftools/ffmpeg: move a few inline function into a new header
Will allow to use them in future commits without including the whole
ffmpeg.h.
2023-11-14 18:18:26 +01:00
Andreas Rheinhardt c06d3d2404 fftools/ffmpeg_demux: Fix leak on error
An AVFormatContext leaks on errors that happen before it is attached
to its permanent place (an InputFile). Fix this by attaching
it earlier.

Given that it is not documented that avformat_close_input() is usable
with an AVFormatContext that has only been allocated with
avformat_alloc_context() and not opened with avformat_open_input(),
one error path before avformat_open_input() had to be treated
specially: It uses avformat_free_context().

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-10 14:30:07 +02:00
Andreas Rheinhardt d98dfcecad fftools/ffmpeg_demux: Don't use fake object with av_opt_eval
The av_opt_eval family of functions emits errors messages on error
and can therefore not be used with fake objects when the AVClass
has a custom item_name callback. The AVClass for AVCodecContext
has such a custom callback (it searches whether an AVCodec is set
to use its name). In practice it means that whatever is directly
after the "cc" pointer to the AVClass for AVCodec in the stack frame
of ist_add() will be treated as a pointer to an AVCodec with
unpredictable consequences.

Fix this by using an actual AVCodecContext instead of a fake object.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-10 14:29:54 +02:00
James Almer d372c2f3d3 fftools/ffmpeg: stop injecting stream side data in packets
This is no longer needed as the side data is available for decoders in the
AVCodecContext.
The tests affected reflect the removal of useless CPB and Stereo 3D side
data in packets.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-06 10:11:19 -03:00
James Almer 3fd37b5268 fftools/ffmpeg: stop using AVStream.side_data
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-06 10:11:00 -03:00
Anton Khirnov 5d58a35f98 fftools/ffmpeg: deprecate the -top option
It is badly named (should have been -top_field_first, or at least -tff),
underdocumented and underspecified, and (most importantly) entirely
redundant with the setfield filter.
2023-09-18 17:16:06 +02:00
Anton Khirnov 2f155b18a1 fftools/ffmpeg: return an error from assert_avoptions() instead of aborting
Rename it to check_avoptions().
2023-07-20 20:47:46 +02:00
Anton Khirnov 87f0333af1 fftools/cmdutils: add error handling to filter_codec_opts() 2023-07-20 20:47:46 +02:00
Anton Khirnov 6c6f13baf3 fftools/ffmpeg: return errors from find_codec_or_die() instead of aborting
Rename the function to just find_codec().
2023-07-20 20:40:26 +02:00
Anton Khirnov 2e6afa799e fftools/cmdutils: add error handling to GROW_ARRAY() 2023-07-20 20:40:26 +02:00
Anton Khirnov 6be4a29397 fftools/cmdutils: add error handling to allocate_array_elem() 2023-07-20 20:40:26 +02:00
Anton Khirnov 37abb3a419 fftools/cmdutils: return error codes from setup_find_stream_info_opts() instead of aborting 2023-07-20 20:40:26 +02:00
Anton Khirnov c23cff5a8a fftools/ffmpeg_demux: return errors from ist_add() instead of aborting 2023-07-15 11:02:11 +02:00
Anton Khirnov cce294638b fftools/ffmpeg: return errors from assert_file_overwrite() instead of aborting 2023-07-15 11:02:11 +02:00
Anton Khirnov 2d59873fc1 fftools/ffmpeg_demux: add logging for -dump_attachment
Makes it more clear what was written where.
2023-07-15 11:02:11 +02:00
Anton Khirnov 63e4e8e4f4 fftools/ffmpeg_demux: forward errors from dump_attachment() instead of aborting
Also, check the return code of avio_close().
2023-07-15 11:02:11 +02:00
Anton Khirnov ff0160cb37 fftools/ffmpeg_demux: drop a redundant avio_flush()
It is immediately followed by avio_close(), which is documented to flush
the buffers.
2023-07-15 11:02:11 +02:00
Anton Khirnov ad80857a97 fftools/ffmpeg_demux: return errors from ifile_open() instead of aborting 2023-07-15 11:02:11 +02:00
Anton Khirnov e89a6d1089 fftools/ffmpeg_dec: move InputStream.prev_sub to Decoder
It does not need to be visible outside of decoding code.
2023-06-19 09:48:56 +02:00
Anton Khirnov 1adad44fc7 fftools/ffmpeg_dec: move InputStream.hwaccel_pix_fmt to Decoder
It is purely decoder-internal state.
2023-06-19 09:48:55 +02:00
Anton Khirnov 6c9cbf7507 fftools/ffmpeg_demux: reindent after previous commit 2023-06-19 09:48:55 +02:00
Anton Khirnov 98766dbbd7 fftools/ffmpeg_demux: move the loop out of add_input_streams()
Make the function process just one input stream at a time and save an
indentation level. Also rename it to ist_add() to be consistent with an
analogous function in ffmpeg_mux_init.
2023-06-19 09:48:55 +02:00
Anton Khirnov c7a05ac117 fftools/ffmpeg_demux: do not set AVCodecContext.framerate
For decoding, this field is used by the decoder to export information
to the caller; it does not make sense for the caller to set it.
2023-06-05 16:15:04 +02:00
Anton Khirnov f8abab673c fftools/ffmpeg: move sub2video handling to ffmpeg_filter
Make all relevant state per-filtergraph input, rather than per-input
stream. Refactor the code to make it work and avoid leaking memory when
a single subtitle stream is sent to multiple filters.
2023-05-31 16:20:19 +02:00
Anton Khirnov 20cacfe493 fftools/ffmpeg: rework setting sub2video parameters
Set them in ifilter_parameters_from_dec(), similarly to audio/video
streams. This reduces the extent to which sub2video filters need to be
treated specially.
2023-05-31 16:20:19 +02:00
Anton Khirnov 4e96a71626 fftools/ffmpeg_demux: log discontinuity warnings to stream context
Allows simplifying the log message.
2023-05-28 10:47:59 +02:00
Anton Khirnov 6abb4a28ef fftools/ffmpeg: add InputStream.index
This allows to avoid access to the underlying AVStream in many places.
2023-05-28 10:47:59 +02:00
Anton Khirnov cad59cccaf fftools/ffmpeg_dec: move timestamp estimation state to Decoder
It is purely internal to decoding.
2023-05-28 10:47:59 +02:00
Anton Khirnov 5b05e9e32a fftools/ffmpeg_dec: move InputStream.pkt to Decoder
It is purely internal to decoding.
2023-05-28 10:47:59 +02:00
Anton Khirnov dadeb28e25 fftools/ffmpeg_dec: add decoder private data
Move InputStream.decoded_frame to it.

Analogous to what has been previously done for all the other major
components.
2023-05-28 10:47:59 +02:00
Anton Khirnov 335688a3d3 fftools/ffmpeg_demux: skip unused/attachment streams in final stats
No useful information can be printed for them.
2023-05-28 10:47:59 +02:00
Anton Khirnov d43ae45de0 fftools/ffmpeg_demux: initialize nb_streams_warn
Fixes spurious new-stream warnings for unused streams after
9429624a76
2023-05-28 10:47:59 +02:00
Anton Khirnov 6ee57fd2b6 fftools/ffmpeg_demux: only print demuxing stats if demuxing actually started
If the transcoding process never got to reading any packets from this
input then printing stats is just pointless noise.
2023-05-28 10:47:59 +02:00
Anton Khirnov d9bcbf9200 fftools/ffmpeg: drop outdated comments 2023-05-28 10:47:59 +02:00
Anton Khirnov 4cec5ffc45 fftools/ffmpeg: rework handling -max_error_rate
Replace the decode_error_stat global with a per-input-stream variable.
Also, print an error message when the error rate is exceeded.
2023-05-22 17:10:44 +02:00
Anton Khirnov 65f3d042a6 fftools/ffmpeg_demux: disallow using disabled input streams
This is less ad-hoc than checking explicitly in every place that binds
an input stream to a filter or output.
2023-05-22 17:10:44 +02:00
Anton Khirnov dfa29ba955 fftools/ffmpeg: return error codes from ist_*_add()
Will be useful in future commits.
2023-05-22 17:10:44 +02:00
Anton Khirnov ede6794d6a fftools/ffmpeg_filter: split finding an unused stream into a function
Avoids filtering code from digging in demuxer internals.
2023-05-22 17:10:44 +02:00
Anton Khirnov de6d60117e fftools/ffmpeg_demux: stop logging to demuxer context
Only the demuxer itself should do that.
2023-05-15 13:32:02 +02:00
Anton Khirnov c5d77dcbf1 fftools/ffmpeg_demux: move InputFile.ts_offset_discont,last_ts to private data
They are no longer used outside of ffmpeg_demux.
2023-05-15 13:32:02 +02:00
Anton Khirnov ab223a4d8c fftools/ffmpeg: stop accessing input format from decoding code
Export the corresponding flag in InputFile instead. This will allow
making the demuxer AVFormatContext private in future commits, similarly
to what was previously done for muxers.
2023-05-15 13:32:02 +02:00
Anton Khirnov a1002bc39c fftools/ffmpeg: replace print_error() by more meaningful messages 2023-05-15 13:32:01 +02:00
Anton Khirnov fd980b2615 fftools/ffmpeg_demux: reindent after previous commit 2023-05-15 13:32:01 +02:00
Anton Khirnov 9429624a76 fftools/ffmpeg: move discarding unused programs to ffmpeg_demux
This is a more appropriate place for this code.
2023-05-15 13:32:01 +02:00
Anton Khirnov f9657b7443 fftools/ffmpeg: simplify tracking -readrate start time
There is no point in having a per-stream wallclock start time, since
they are all computed at the same instant. Keep a per-file start time
instead, initialized when the demuxer thread starts.
2023-05-15 13:32:01 +02:00
Anton Khirnov 6b0c984f0d fftools/ffmpeg_demux: move InputStream.streamcopy_needed to private data
It is no longer used outside of ffmpeg_demux.
2023-05-15 13:32:01 +02:00
Anton Khirnov 7df3253c5a fftools/ffmpeg_demux: move InputStream.wrap_correction_done to private data
It is no longer used outside of ffmpeg_demux.
2023-05-15 13:32:01 +02:00
Anton Khirnov df25e21ce7 fftools/ffmpeg_demux: move InputStream.[next_]dts to private data
They are no longer used outside of ffmpeg_demux.
2023-05-15 13:32:01 +02:00
Anton Khirnov 6d7b43ed44 fftools/ffmpeg_demux: move InputStream.[saw_]first_d?ts to private data
They are no longer used outside of ffmpeg_demux.
2023-05-15 13:32:01 +02:00
Anton Khirnov 57a2b2f886 fftools/ffmpeg_demux: move InputStream.{nb_packets,data_size} to private data
They are no longer used outside of ffmpeg_demux.
2023-05-15 13:32:01 +02:00
Anton Khirnov bfd5e7ef5d fftools/ffmpeg_demux: reindent after previous commit 2023-05-15 13:32:01 +02:00
Anton Khirnov 2b99c6bfd5 fftools/ffmpeg: move post-demux packet processing to ffmpeg_demux
That is a more appropriate place for this code and will allow hiding
more of InputStream.

The value of repeat_pict extracted from libavformat internal parser no
longer needs to be trasmitted outside of the demuxing thread.

Move readrate handling to the demuxer thread. This has to be done in the
same commit, since it reads InputStream.dts,nb_packets, which are now
set in the demuxer thread.
2023-05-15 11:03:15 +02:00
Anton Khirnov 09c686788e 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.
2023-05-15 10:57:19 +02:00
Anton Khirnov abf9532bda fftools/ffmpeg_demux: move preparing DemuxMsg to separate function
Will be useful in following commits, which will move more code into this
function.
2023-05-15 10:57:19 +02:00
Anton Khirnov a238ba9c3c fftools/ffmpeg: stop using deprecated ticks_per_frame 2023-05-15 10:56:48 +02:00
Anton Khirnov 2d43c23b81 fftools/ffmpeg: discard packets for unused streams in demuxing thread
Avoids the pointless overhead of transferring them to the main thread.
2023-05-08 10:38:59 +02:00
Anton Khirnov c7c73a3250 fftools/ffmpeg_filter: take fallback parameters from decoder, not demuxer
When an input stream terminates and no frames were successfully decoded,
filtering code will currently configure the filtergraph using demuxer
stream parameters. Use decoder parameters instead, which should be more
reliable. Also, initialize them immediately when an input stream is
bound to a filtergraph input, so that these parameters are always
available (if at all) and filtering code does not need to reach into the
decoder at some arbitrary later point.
2023-05-08 10:38:59 +02:00
Anton Khirnov 0e00d23510 fftools/ffmpeg: reduce -re to -readrate 1
They are exactly equivalent, so there is no point in maintaining a
separate flag for -re.
2023-05-07 15:49:27 +02:00
Anton Khirnov 007ec49db8 fftools/ffmpeg: use a non-zero default for -readrate_initial_burst
Use it to replace a hack added in 6f20685228.
2023-05-07 15:49:21 +02:00
Davy Durham 2ae16b05d6 fftools/ffmpeg: add ability to set a input burst time before readrate is enforced
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-05-07 15:48:15 +02:00
Anton Khirnov 302aecd06a fftools/ffmpeg: drop InputStream.[next_]pts
They are no longer used for anything.
2023-05-02 10:59:24 +02:00
Anton Khirnov d85c6aba0c fftools/ffmpeg: rework audio-decode timestamp handling
Stop using InputStream.dts for generating missing timestamps for decoded
frames, because it contains pre-decoding timestamps and there may be
arbitrary amount of delay between input packets and output frames (e.g.
dependent on the thread count when frame threading is used). It is also
in AV_TIME_BASE (i.e. microseconds), which may introduce unnecessary
rounding issues.

New code maintains a timebase that is the inverse of the LCM of all the
samplerates seen so far, and thus can accurately represent every audio
sample. This timebase is used to generate missing timestamps after
decoding.

Changes the result of the following FATE tests
* pcm_dvd-16-5.1-96000
* lavf-smjpeg
* adpcm-ima-smjpeg
In all of these the timestamps now better correspond to actual frame
durations.
2023-05-02 10:59:24 +02:00
Anton Khirnov 2058402e00 fftools/ffmpeg: open decoders right after we know they are needed
Will allow initializing subtitle encoding earlier.
2023-04-17 12:01:40 +02:00
Anton Khirnov ff92ecad2f fftools/ffmpeg: stop setting InputStream fields from muxing/filtering code
Set InputStream.decoding_needed/discard/etc. only from
ist_{filter,output},add() functions. Reduces the knowledge of
InputStream internals in muxing/filtering code.
2023-04-17 12:01:40 +02:00
Anton Khirnov ae071c9e39 fftools/ffmpeg: add a function adding a destination filter for InputStream
This way filtering code does not directly mess with InputStream
internals. Will become more useful in following commits.
2023-04-17 12:01:40 +02:00
Anton Khirnov 89c9a3ac35 fftools/ffmpeg: avoid possible invalid reads with short -tag values
Fixes #10319 and #10309.
2023-04-17 11:49:34 +02:00
Anton Khirnov 5d407cb2d7 fftools/ffmpeg: change video decoding timestamp generation
When no timestamps are available from the container, the video decoding
code will currently use fake dts values - generated in
process_input_packet() based on a combination of information from the
decoder and the parser (obtained via the demuxer) - to generate
timestamps during decoder flushing. This is fragile, hard to follow, and
unnecessarily convoluted, since more reliable information can be
obtained directly from post-decoding values.

The new code keeps track of the last decoded frame pts and estimates its
duration based on a number of heuristics. Timestamps generated when both
pts and pkt_dts are missing are then simple pts+duration of the last frame.
The heuristics are somewhat complicated by the fact that lavf insists on
making up packet timestamps based on its highly incomplete information.
That should be removed in the future, allowing to further simplify this
code.

The results of the following tests change:
* h264-3386 now requires -fps_mode passthrough to avoid dropping frames
  at the end; this is a pathology of the interaction of the new and old
  code, and the fact that the sample switches from field to frame coding
  in the last packet, and will be fixed in following commits
* hevc-conformance-DELTAQP_A_BRCM_4 stops inventing an arbitrary
  timestamp gap at the end
* hevc-small422chroma - the single frame output by this test now has a
  timestamp of 0, rather than an arbitrary 7
2023-04-13 15:34:07 +02:00
Anton Khirnov d1cb31d7d8 fftools/ffmpeg_demux: set the timebase on demuxed packets
Simplifies tracking what timebase are the timestamps in. Will be useful
in following commits.
2023-04-13 15:11:56 +02:00
Anton Khirnov a85e7e5dea fftools/ffmpeg: track a list of non-lavfi outputs in InputStream
Currently, output streams where an input stream is sent directly (i.e.
not through lavfi) are determined by iterating over ALL the output
streams and skipping the irrelevant ones. This is awkward and
inefficient.
2023-04-13 15:11:56 +02:00
Anton Khirnov 952110f974 fftools/ffmpeg_demux: log final stats to demuxer context 2023-04-13 15:11:56 +02:00
Anton Khirnov 28e258a809 fftools/ffmpeg_demux: reindent 2023-04-13 15:11:56 +02:00
Anton Khirnov 5d97ba5d9c fftools/ffmpeg: move printing verbose demuxing stats to ffmpeg_demux
This is a more appropriate place for this.
2023-04-13 15:11:56 +02:00
Anton Khirnov 87e9f5ad3c fftools/ffmpeg: move initializing next_[pd]ts to add_input_streams()
They are initialized to constants, so it makes most sense to do it as
soon as possible.
2023-04-09 15:47:45 +02:00
Stefano Sabatini 9998c31044 ffmpeg_demux: show fixed timestamps in ts_fixup
Help debugging.
2023-02-28 22:24:56 +01:00
Anton Khirnov 156ca86569 fftools/ffmpeg: move ts_scale to DemuxStream
It is not needed outside of ffmpeg_demux.
2023-02-20 19:22:22 +01:00
Anton Khirnov 66c1e956aa fftools/ffmpeg_demux: add an AVClass to DemuxStream/InputStream
Use it for logging. This makes log messages related to this input stream
more consistent.
2023-02-20 19:22:22 +01:00
Anton Khirnov d9079f6700 fftools/ffmpeg_demux: move InputStream.guess_layout_max to stack
It is only needed while processing the stream in add_input_streams(), no
reason to store it in the context.
2023-02-20 19:22:22 +01:00
Anton Khirnov 8a7554a574 fftools/ffmpeg_demux: add InputStream private data
Move {min,max}_pts to it, which is not used outside of ffmpeg_demux.
2023-02-20 19:22:22 +01:00
Anton Khirnov cd4cd95d5e fftools/ffmpeg_demux: add an AVClass to Demuxer/InputFile
Use it for logging. This makes log messages related to this input file
more consistent.
2023-02-20 19:22:22 +01:00
Anton Khirnov 9b5036fabd fftools/ffmpeg: add an AVClass to MuxStream/OutputStream
Use it for logging. This makes log messages related to this output
stream more consistent.
2023-01-29 09:12:22 +01:00
Zhao Zhili 52eb2396d7 fftools/ffmpeg_demux: prefer fd over pipe for seek support
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-01-11 18:50:36 +08:00
Zhao Zhili 195ccf7ea8 fftools/ffmpeg_demux: disable stdin interaction for fd protocol
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-01-11 18:50:36 +08:00
Marvin Scholz f1907faab4 fftools: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Anton Khirnov fd8bf8d3b5 fftools/ffmpeg: remove the input_streams global
Replace it with an array of streams in each InputFile. This is a more
accurate reflection of the actual relationship between InputStream and
InputFile.

Analogous to what was previously done to output streams in
7ef7a22251.
2022-11-23 10:36:23 +01:00
Zhao Zhili c0c0a5f106 fftools/ffmpeg_demux: set default hwaccel_output_format for mediacodec
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-11-21 23:57:10 +08:00
Anton Khirnov b58264217b fftools/ffmpeg_mux_init: drop an always-false check
It cannot be true since 1959351aec. Effectively reverts 6a3833e141.
2022-11-17 10:52:58 +01:00
Anton Khirnov 822da7a317 fftools/ffmpeg: make demuxing with one file always blocking 2022-11-16 08:41:14 +01:00
Anton Khirnov c15eb2773a fftools/ffmpeg_[de]mux: constify all uses of OptionsContext 2022-11-16 08:41:14 +01:00
Gyan Doshi 5ccd4d3060 ffmpeg: fix implementation of updated input start time
The current adjustment of input start times just adjusts the tsoffset.
And it does so, by resetting the tsoffset to nullify the new start time.
This leads to breakage of -copyts, ignoring of input_ts_offset, breaking
of -isync as well as breaking wrap correction.

Fixed by taking cognizance of these parameters, and by correcting start times
just before sync offsets are applied.
2022-11-03 14:38:42 +05:30
Anton Khirnov 7aa5ea237f fftools/ffmpeg_demux: stop modifying OptionsContext
It should be input-only to this code.
2022-10-25 11:13:03 +02:00
Anton Khirnov 21ef1f2cec fftools/ffmpeg_demux: log when the demuxer thread terminates
Similar to what is done for muxing, may be useful for debugging.
2022-10-25 11:04:42 +02:00
Anton Khirnov 5c1a096d02 fftools/ffmpeg: move nb_streams_warn from InputFile to Demuxer
It is private to the demuxer and do not need to be visible outside of
it.
2022-10-25 11:04:42 +02:00
Anton Khirnov d8f7ce38da fftools/ffmpeg_demux: do not log to the demuxer context
Only the demuxer itself is supposed to do that.
2022-10-25 11:04:42 +02:00