Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-07fftools/ffprobe: Loop over correct number of streams when flushing decodersDerek Buitenhuis
Some formats like FLV can dynamically add streams during packet reading. FFprobe does check for this and reallocates the global stream info, but does not reallocate InputFrame's streams and decoders when this happens, which, as a result, could have caused flushing to occur on an out of bounds stream index, since the flush loop iterates over fmt_ctx's nb_streams, and not ifile's, despite using ifile's streams. This fixes an out of bounds read and segfult. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2022-11-03ffmpeg: fix implementation of updated input start timeGyan Doshi
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-03ffmpeg: shift start time correction to ffmpeg_optGyan Doshi
In preparation for applying start time correction that accounts for all factors such as copyts, input_ts_offset ..etc
2022-10-25fftools/ffmpeg_demux: stop modifying OptionsContextAnton Khirnov
It should be input-only to this code.
2022-10-25fftools/ffmpeg_mux_init: stop modifying OptionsContext.*_disableAnton Khirnov
The current code will override the *_disable fields (set by -vn/-an options) when creating output streams for unlabeled complex filtergraph outputs, in order to disable automatic mapping for the corresponding media type. However, this will apply not only to automatic mappings, but to manual ones as well, which should not happen. Avoid this by adding local variables that are used only for automatic mappings.
2022-10-25fftools/ffmpeg_mux_init: move code creating streams into a new functionAnton Khirnov
Makes it easy to see where all the streams are created. Will also be useful in the following commit.
2022-10-25fftools/ffmpeg_mux_init: stop modifying some OptionsContext fieldsAnton Khirnov
Specifically recording_time and stop_time - use local variables instead. OptionsContext should be input-only to this code. Will allow making it const in future commits.
2022-10-25fftools/ffmpeg_mux_init: constify metadata specifier argumentsAnton Khirnov
2022-10-25fftools/ffmpeg_mux_init: avoid modifying OptionsContext.chapters_input_fileAnton Khirnov
Use a local variable instead. This will allow making OptionsContext const in future commits.
2022-10-25fftools/ffmpeg: factor out copying metadata/chapters from of_open()Anton Khirnov
This code shares variables like OptionsContext.metadata_*_manual, so it makes sense to group it together.
2022-10-25fftools/ffmpeg_demux: log when the demuxer thread terminatesAnton Khirnov
Similar to what is done for muxing, may be useful for debugging.
2022-10-25fftools/ffmpeg: move nb_streams_warn from InputFile to DemuxerAnton Khirnov
It is private to the demuxer and do not need to be visible outside of it.
2022-10-25fftools/ffmpeg_demux: do not log to the demuxer contextAnton Khirnov
Only the demuxer itself is supposed to do that.
2022-10-25fftools/ffmpeg: move duration/time_base from InputFile to DemuxerAnton Khirnov
They are private to the demuxer and do not need to be visible outside of it.
2022-10-25fftools/ffmpeg: move threading fields from InputFile to DemuxerAnton Khirnov
They are private to the demuxer and do not need to be visible outside of it.
2022-10-25fftools/ffmpeg: drop free_input_threads()Anton Khirnov
Stop demuxer threads in ifile_close() instead. Simplifies the demuxer API.
2022-10-25fftools/ffmpeg: move closing the input file into a separate functionAnton Khirnov
For now this is just closing the format context and freeing InputFile, but will contain more in the future.
2022-10-25fftools/ffmpeg: drop init_input_threads()Anton Khirnov
Start threads implicitly when ifile_get_packet() is called. Simplifies the demuxer API.
2022-10-25fftools/ffmpeg_demux: add demuxer private dataAnton Khirnov
Move InputFile.loop into it.
2022-10-25fftools/ffmpeg_opt: move opening input files to ffmpeg_demux.cAnton Khirnov
This is similar to what was done before for output files and will allow introducing demuxer-private state in future commits Unlike for muxing, the code is moved to existing ffmpeg_demux.c rather than to a new file. The reason is just file size - the demuxing code is much smaller than muxing.
2022-10-24fftools/ffmpeg: set thread namesAnton Khirnov
2022-10-21fftools/ffmpeg: rename read_file() to avoid conflict with libassAnton Khirnov
libass defines a non-static read_file() symbol, which causes conflicts with static linking.
2022-10-19ffmpeg: Deprecate display rotation override with a metadata keyJan Ekström
Now that we have proper options for defining display matrix overrides, this should no longer be required. fftools does not have its own versioning, so for now the define is just set to 1 and disables the functionality if set to zero.
2022-10-19ffmpeg: Add display_{rotation, hflip, vflip} optionsJan Ekström
This enables overriding the rotation as well as horizontal/vertical flip state of a specific video stream on the input side. Additionally, switch the singular test that was utilizing the rotation metadata to instead override the input display rotation, thus leading to the same result.
2022-10-18fftools/ffmpeg_opt: Move stuff only used by ffmpeg_mux_init to itAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-18fftools/ffmpeg_mux: move muxing queue fields from OutputStream to MuxStreamAnton Khirnov
They are private to the muxer and do not need to be visible outside of it.
2022-10-18fftools/ffmpeg_mux: move bsf_ctx from OutputStream to MuxStreamAnton Khirnov
It is private to the muxer and does not need to be visible outside of it.
2022-10-18fftools/ffmpeg_mux: embed OutputStream in a MuxStreamAnton Khirnov
This is now possible since OutputStream is a child of OutputFile and the code allocating it can access MuxStream. Avoids the overhead and extra complexity of allocating two objects instead of one. Similar to what was previously done for OutputFile/Muxer.
2022-10-18fftools/ffmpeg: free output streams in of_close()Anton Khirnov
Output streams are now children of OutputFile, so it makes more sense to free them there.
2022-10-18fftools/ffmpeg: remove a cleanup block at the end of transcode()Anton Khirnov
Some of it is already duplicated in ost_free() - those parts can be just dropped. The rest is moved to ost_free(), as it properly belongs there.
2022-10-18fftools/ffmpeg: remove the output_streams globalAnton Khirnov
Replace it with an array of streams in each OutputFile. This is a more accurate reflection of the actual relationship between OutputStream and OutputFile. This is easier to handle and will allow further simplifications in future commits.
2022-10-18fftools/ffmpeg_mux_init: pass Muxer to new_output_stream()Anton Khirnov
And intermediate functions. Will be useful in the following commit.
2022-10-18fftools/ffmpeg: reindent after previous commitAnton Khirnov
2022-10-18fftools/ffmpeg: move freeing an output stream into a separate functionAnton Khirnov
2022-10-18fftools/ffmpeg: move init_output_bsfs() to ffmpeg_muxAnton Khirnov
Bitstream filtering is done as a part of muxing, so this is the more proper place for this.
2022-10-18fftools/ffmpeg_mux: move sq_mux from OutputFile to MuxerAnton Khirnov
It is internal to ffmpeg_mux* and does not need to be visible to other code.
2022-10-18fftools/ffmpeg_mux: inline mux_free() into of_close()Anton Khirnov
mux_free() is no longer called from anywhere else.
2022-10-18fftools/ffmpeg_mux: inline of_muxer_init() into of_open()Anton Khirnov
A separate muxer init is no longer necessary, now that of_open() has access to Muxer.
2022-10-18fftools/ffmpeg_mux: allocate sq_pkt in setup_sync_queues()Anton Khirnov
This is now possible since setup_sync_queues() can interact with Muxer.
2022-10-18fftools/ffmpeg_mux: embed OutputFile in a MuxerAnton Khirnov
This is now possible since the code allocating OutputFile can see sizeof(Muxer). Avoids the overhead and extra complexity of allocating two objects instead of one. Similar to what is done e.g. for AVStream/FFStream in lavf.
2022-10-18fftools/ffmpeg_mux: move Muxer and MuxStream to a new headerAnton Khirnov
This will allow ffmpeg_mux_init.c to work with these structs.
2022-10-18fftools/ffmpeg_opt: move opening output files into a new fileAnton Khirnov
ffmpeg_opt.c currently contains code for - parsing the options provided on the command line - opening and initializing input files based on these options - opening and initializing output files based on these options The code dealing with each of these is for the most part disjoint, so it makes sense to move them to separate files. Beyond reducing the quite considerable size of ffmpeg_opt.c, this will also allow exposing muxer internals (currently private to ffmpeg_mux.c) to the initialization code, thus removing the awkward separation currently in place.
2022-10-18fftools/ffmpeg: move some stream initialization code to ffmpeg_muxAnton Khirnov
The code in question is muxing-specific and so belongs there. This will allow make some objects private to the muxer in future commits.
2022-10-18fftools/ffmpeg_mux: drop the of_ prefix from of_submit_packet()Anton Khirnov
This function is now static.
2022-10-18fftools/ffmpeg_mux: rename submit_packet() to thread_submit_packet()Anton Khirnov
This is more descriptive, and the submit_packet() name will be reused in following commits.
2022-10-18fftools/ffmpeg: move output_packet() to ffmpeg_muxAnton Khirnov
This function is common to both transcoding and streamcopy, so it properly belongs into the muxing code.
2022-10-18fftools/ffmpeg_mux: do not unref a NULL packetAnton Khirnov
The packet submitted to of_submit_packet() may be NULL to signal EOF.
2022-10-14fftools/ffmpeg_opt: Use av_err2strMarvin Scholz
This simplifies the code as there is no other place the error buffer is needed, so the av_err2str helper macro can be used. Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-10-14fftools/ffprobe: Use av_err2strMarvin Scholz
av_err2str which is a wrapper for av_strerror already calls strerror_r if available and if not has a fallback for the other error codes that would be handled by that, so manually calling strerror again if it fails is not necessary. Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-10-14fftools/cmdutils: Use av_err2strMarvin Scholz
av_err2str which is a wrapper for av_strerror already calls strerror_r if available and if not has a fallback for the other error codes that would be handled by that, so manually calling strerror again if it fails is not necessary. Signed-off-by: Anton Khirnov <anton@khirnov.net>