* commit '59245e0c5e10a849e67c632cccf4f677b2442e82':
avconv: set the encoding/decoding_needed flags earlier
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes: 39a25908b84604acdaa490138282d091_signal_sigsegv_7ffff713351a_331_WAWV.avi with memlimit of 262144
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes: 1013dbde2c360d939cc2dfc33e4f275c_signal_sigsegv_a0500f_45_320vp3.nsv with memlimit of 536870912
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes: 18615ff56beedc63a884a8db0678b47c_signal_sigsegv_7ffff713351a_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 524288
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes: 09e670595acbdafb226974b08dab66e3_signal_sigabrt_7ffff70eccc9_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 1048576
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
If threading is used, the first (thread_count - 1) packets are read
before any frame/error is returned. Counting this as successful decoding
is wrong, because it also happens when no single frame could be decoded.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This is the second part of the fix for ticket #4370.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* commit '9a5e4fbec870c7d466b7a0aec92c70778efc96b5':
avconv: do not stop processing the input packet on decoding error
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b114f6d48a06a4dad6882bc83e07463905f004c4':
avconv: factor out flushing the filters
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '16302246b1fcb7ad4e6f7bd31c49956a455336d2':
avconv: Add an option for automatically rotating video according to display matrix
Conflicts:
Changelog
ffmpeg_opt.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '3892bdab9b652eb003ab95e167f1765e0b0ea035':
avconv: do not overwrite the stream codec context for streamcopy
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This improves the last frames duration with CFR and when the input durations
are inaccurate or missing
Fixes Ticket4119
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'dc7536ca3d2dbe47f40cc0fcd0fc2555a84d5f56':
avconv: do not abort immediately if initializing hwaccel fails
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Previously the duration was sometimes wrong, this addition
limits the value and improves which frames are choosen when
reducing the frame rate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This is a bit ugly as it attempts to keep most of the computation
in integers before the double based fps code. The use of integers
is to reduce the chances of rounding differences between platforms
Previously the timestamp was rounded to the encoder timebase
before being converted back to double precision which could cause loss
of precision
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Allow printing of sdp information to a file specified by -sdp_file
This allows users to print sdp information when at least one of the
outputs isn't an rtp stream.
Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The format is now:
-bsf:X filter1[=opt1=str1/opt2=str2],filter2
ie the parameters are appended after the filter name using '='. As ','
has been reserved already for the list of filters, '/' is just an
example of token separation for now, but that could become part of the
API to avoid each bsf using its own tokenization.
The proper solution would be using AVOption, but this is overkill for now.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This improves the handling of cases where the frame duration is not known
Fixes Ticket 4119
Fixes Ticket 1578
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '88b32673db39440422a73ec3047d3326c96b4fb2':
avconv: copy stream-level side data when streamcopying
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '6cfbe1de5ac6c57c41459626f7ac32841d63ace8':
avconv: Use only audio and video to guess discontinuities
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The issue is that, when the main packet data buffer is changed, streamcopy
uses a temporary new packet to store that buffer, frees the old packet, and
replace it with the new packet.
However, in doing so, it forgets about the side data, which gets freed, but
is still needed and referenced. Then, when the packet gets freed again in
the normal code path, it attempts to free its side data which has already
been freed.
Therefore, simply avoid the first free on side data by removing that side
data from the packet.
Fixes ticket #3773.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '3f3232a371cc88696184d9aef1f812656264e56c':
avconv: set the output stream timebase
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Commit fc9c857c introduced deadlock regression when processing too many inputs:
ffmpeg $(seq -f " -f lavfi -i aevalsrc=0:d=%.0f" 70) -vf concat=n=70:v=0:a=1 -f null -
Happens for different number of inputs, depending on available memory size,
overcommit settings, ulimits, etc. Easily noticeable for 32-bit builds,
that exhaust address space allocating 8-10 MB stack for each thread.
Earlier ffmpeg versions exited with unhelpful "Conversion failed!" message.
This patch fixes both problems: it frees the queue to prevent deadlock
and adds a meaningful error message if pthread_create() fails.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
With threads the decoder has a delay and will thus have multiple
frames at EOF left in its buffers which will be returned when flushing
the decoder. The code that extracts such frames from the decoder at the
end does not pull frames from the filtergraph, thus when one of these
frames causes the filtergraph to be reinited, the frames still inside
the graph at that point re lost
This commit changes the flushing to be more similar to normal decoding
and 1 frame at a time
Fixes hqx fate with threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '452860d7e056f9a894cac2fe52cdedeae4c38251':
Use av_packet_rescale_ts() to simplify code.
Conflicts:
doc/examples/muxing.c
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>