Should prevent unnecessary copy of data in cases where new references
to the packet are created within the muxer or a bitstream filter.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
It's been a noop for years, and it's been argued that in-band headers
should not be forcedly removed without the user's explicit request.
Also, as the FIXME line stated, this is a job for a bitstream filter
like extract_extradata, remove_extradata, dump_extradata, and
filter_units.
Signed-off-by: James Almer <jamrial@gmail.com>
When a decoded stream is being looped, after each post-EOF rewind,
decoders are flushed in seek_to_start(). This only drains 1 frame, and
thus the output has a few frames missing at the tail of each iteration
except the last.
With this patch, process_input is looped till process_input_packet
reaches EOF.
Fixes#7081
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Support dump bit stream filter option in ffmpeg -h full and
ffmpeg -h bsf=FooBar.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes a regression since 2a88ebd096 which caused
an infinite loop in the subtitle decoding.
Fixes ticket #6796.
Signed-off-by: Marton Balint <cus@passwd.hu>
ffmpeg -h display "max_error_rate" option help information have
been cut off, the root cause is used a wrong initial order.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This reverts commit cdc78058c7.
It introduced several issues in the command line tools, and it's
implementing a new API that may still see some changes.
Revert for the time being until the state of the API is defined.
Signed-off-by: James Almer <jamrial@gmail.com>
coded_width/height are unnitialized and will be overwritten by
dec_ctx->width/height in avcodec_open2()
This fixes tiket #6958.
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
On systems which deliver SIGPIPE (Unices), a broken pipe will currently
result in the immediate termination of the ffmpeg process (the default
disposition as required by POSIX). This is undesirable, because while
the broken pipe is likely fatal to useful cleanup of whatever component
is writing to it, there might be other components which can do useful
cleanup - for example, a muxer on another stream may still need to write
indexes to complete a file. Therefore, set the signal disposition for
SIGPIPE to ignore the signal - the call which caused the signal will
fail with EPIPE and the error will be propagated upwards like any other
I/O failure on a single stream.
The function avformat_alloc_context() will return a NULL pointer on
failure. However, in function read_ffserver_streams(), its return value
is not validated and the subsequent dereference may result in a bad
memory access bug. Check its return value against NULL and avoid
potential NULL dereference.
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This was added in early 2013 and abandoned several months later; as far as
I can tell, there are no external users. Future OpenCL use will be via
hwcontext, which requires neither special OpenCL-only API nor global state
in libavutil.
All internal users are also deleted - this is just the unsharp filter
(replaced by unsharp_opencl, which is more flexible) and the deshake filter
(no replacement).
add return value check to supress the build warning message like
"warning: ignoring return value" when use attribute -Wunused-result.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: 刘歧 <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Adds ui64 (uint64_t) as a possible type for SpecifierOpt. This enables
use of uint64_t options with SpecifierOpt such as channel_layout
when expressed as a 64 bit channel mask.
Signed-off-by: pkviet <pkv.stream@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
For some strange reason "-t" option was only implemented
for input files while both "-t" and "-to" were available
for use for output files. This made extracting a range from
input file inconvenient.
This patch enables -to option for input so one can do
ffmpeg -ss 1:23:20 -to 1:27:22.3 -i myinput.mkv ...
Signed-off-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
With there being two hwaccels that use the CUDA pix_fmt now, just
relying on the pix_fmt to identify the selected hwaccel is not enough
anymore.
So this checks if the user explicitly selected a hwaccel, and only
accepts that one.
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>
Merges Libav commit b9129ec466.
Due to the name clash with our cuvid decoder, rename it to nvdec.
This commit also changes the Libav code to dynamic loading of the
cuda/cuvid libraries.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Fixes looping files without audio or when using stream_copy, where
ist->nb_samples is not set since no decoding is done.
This fixes ticket #5719 and also fixes an endless loop with the sample
in ticket #6139.
Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Typically only a small subset of the SDL texture formats are supported directly
by the SDL renderer drivers, the rest is software emulated. It's better if
libswscale does the format conversion to a hardware-accelerated texture format
instead of SDL.
This should fix video render slowdowns with some texture formats after
3bd2228d05.
Signed-off-by: Marton Balint <cus@passwd.hu>
Since a7da134742, flush packets are passed
to process_input_packet() during stream copy. This modifies the input
timestamp handling to ignore them - since they contain no data, timestamps
should not be affected.
It has no effect whatsoever since the major bump.
Replace the flag's documentation to reflect this as well.
Signed-off-by: James Almer <jamrial@gmail.com>