Commit Graph

2164 Commits

Author SHA1 Message Date
Simon Thelen b9a3e0af07 ffmpeg: Don't try and write sdp info if none of the outputs had an rtp format.
Fixes a segfault when trying to write nonexistent rtp information.

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 70fb5eadc5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:47 +01:00
Michael Niedermayer 43b094fa03 ffmpeg: Use correct codec_id for av_parser_change() check
No testcase known

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 45f3d4e63e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer 483f5bccc1 ffmpeg: Check av_parser_change() for failure
No testcase known

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ac0ba6f233)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer ce17111ed1 ffmpeg: Check for RAWVIDEO and do not relay only on AVFMT_RAWPICTURE
The null muxer has AVFMT_RAWPICTURE set but can be fed with non-raw material

related to Ticket4778

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8890941d6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer a8c8a2f3f4 ffmpeg: check avpicture_fill() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 15ff3f3fdf)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Andreas Cadhalpun 70b97a89d2 ffmpeg: only count got_output/errors in decode_error_stat
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>
(cherry picked from commit bd0f14123f)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-19 09:43:05 +02:00
Andreas Cadhalpun 1d1adf5ff4 ffmpeg: exit_on_error if decoding a packet failed
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>
(cherry picked from commit cd64ead8d9)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>

Conflicts:
	ffmpeg.c
2015-07-19 09:42:22 +02:00
Michael Niedermayer 2e7bd0f725 ffmpeg: Fix cleanup after failed allocation of output_files
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>
(cherry picked from commit 6e80fe1ecd)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 20:23:46 +02:00
Michael Niedermayer a18e8d82de ffmpeg: Fix crash with ost->last_frame allocation failure
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>
(cherry picked from commit fd4c87fa3b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 20:23:46 +02:00
Michael Niedermayer 441ef87ea8 ffmpeg: Fix cleanup with ost = NULL
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>
(cherry picked from commit 503ec7139f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 20:23:46 +02:00
Michael Niedermayer 483a02e25f ffmpeg: Do not use the data/size of a bitstream filter after failure
Found-by: Rodger Combs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8f0f678f09)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-18 20:23:45 +02:00
Michael Niedermayer e04ae11fa0 ffmpeg: Free last_frame instead of just unref
Fixes Ticket4611

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1050d9950)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Michael Niedermayer 4fe38441b0 ffmpeg: do not print misleading recommanditions on 1pass vpx encoding
Fixes part of Ticket4295

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 23:42:44 +02:00
Michael Niedermayer 18833daf9d ffmpeg: Support copying unknown streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 18:21:38 +02:00
Michael Niedermayer 57e38043de ffmpeg: Do not copy the display matrix if rotation meta-data is manually added
Fixes Ticket4560

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-18 00:52:36 +02:00
Michael Niedermayer b87dd7f82d ffmpeg: only apply last picture flush code at EOF
Fixes Ticket4562

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-17 00:34:08 +02:00
anatolschwarz 77cc0d5b59 ffmpeg: Support preserving the source key frame timings
Added option "source" to force_key_frames
2015-05-16 12:55:19 +02:00
Michael Niedermayer 3a91a07f15 ffmpeg: Remove another unneeded ost->filter_graph check
Fixes CID1241508

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 23:46:10 +02:00
Michael Niedermayer 670702f91d ffmpeg: Print an error if avfilter_graph_queue_command() failed
Fixes CID1271809

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 12:41:28 +02:00
Michael Niedermayer da2f156843 ffmpeg: remove unneeded ost->filter check
Fixes CID1241508

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 12:34:20 +02:00
Michael Niedermayer f5b26fbc2f Merge commit '16302246b1fcb7ad4e6f7bd31c49956a455336d2'
* 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>
2015-05-02 22:39:00 +02:00
Michael Niedermayer e2877bdf38 ffmpeg: remove incorrect network deinit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 15:57:21 +02:00
Michael Niedermayer 93db2708d3 ffmpeg: Fix null pointer dereference in do_video_out()
Fixes: CID1295087

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-19 23:44:19 +02:00
Michael Niedermayer 959894632a Merge commit '3892bdab9b652eb003ab95e167f1765e0b0ea035'
* commit '3892bdab9b652eb003ab95e167f1765e0b0ea035':
  avconv: do not overwrite the stream codec context for streamcopy

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-04 00:38:02 +02:00
Michael Niedermayer 4d02dfbde4 ffmpeg: Fix extradata allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-04 00:02:14 +02:00
Michael Niedermayer 6eb6956d06 ffmpeg: Fix indentation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-03 19:39:06 +02:00
Michael Niedermayer 98c7729c13 ffmpeg: last frame duplication heuristic
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>
2015-04-03 19:09:31 +02:00
Himangi Saraogi d768f8f5cf ffmpeg: Avoid null pointer dereferences
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-02 13:06:00 +02:00
Michael Niedermayer 215c2fe0ae Merge commit '22a6d48b0d7367b3a45dd6db245f8ffaaa364995'
* commit '22a6d48b0d7367b3a45dd6db245f8ffaaa364995':
  avconv: Print the avfilter errors

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-20 20:33:27 +01:00
Michael Niedermayer f063a0b33d Merge commit 'dc7536ca3d2dbe47f40cc0fcd0fc2555a84d5f56'
* commit 'dc7536ca3d2dbe47f40cc0fcd0fc2555a84d5f56':
  avconv: do not abort immediately if initializing hwaccel fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-10 10:49:48 +01:00
Clément Bœsch c285937ccc ffmpeg: comment mpeg4 hack
See 3734c3ea51
2015-03-03 20:25:28 +01:00
Michael Niedermayer 5ee3a40f1c ffmpeg: Fix -vstats when coded_frame is not set
There are several encoders which do not set coded_frame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 12:33:44 +01:00
Nicolas George d92c6d82c0 ffmpeg: notify when the thread message queue blocks.
This can help finding the source of A-V desync with live input.
2015-02-26 19:19:56 +01:00
Nicolas George 508d6a23b4 ffmpeg: allow to set the thread message queue size. 2015-02-26 19:19:56 +01:00
Michael Niedermayer 2384933985 ffmpeg: Print negative times like "-00:05:01.22" instead of "00:-5:-1.-22"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-11 11:22:27 +01:00
Michael Niedermayer 77f326dc36 ffmpeg: Make CFR frame drop threshold user adjustable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-04 02:40:41 +01:00
Paul B Mahol 5274860fe2 ffmpeg: remove unused header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-01-30 15:32:11 +00:00
Christophe Gisquet 1fa637d2ef ffmpeg: free_input_threads requires HAVE_PTHREADS
Hide behind that macro to avoid warning on systems with
!HAVE_PTHREADS.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-30 14:47:08 +01:00
Michael Niedermayer 85d7e02e4a ffmpeg: allow overriding and amending AVStream->disposition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-25 01:27:21 +01:00
Michael Niedermayer 90c98994f6 ffmpeg: Reduce noisiness of frame clipping in rate convertion
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-19 03:51:43 +01:00
Michael Niedermayer a582705d15 ffmpeg: Favor filter graph based duration over ost->frame_rate in fps code
The fate change adds a last frame with a subtitle not displayed in the previous

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-19 03:13:16 +01:00
Michael Niedermayer f96148913b Fix precission typos
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-16 22:42:42 +01:00
Michael Niedermayer d3d9a00bcd ffmpeg: Use filter graph output frame rate also for frame duration estimation
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>
2015-01-16 20:33:08 +01:00
Michael Niedermayer 7b32856011 ffmpeg: Maintain higher precision pts between video filter and fps code
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>
2015-01-16 19:53:17 +01:00
Michael Niedermayer 261e8ccbd1 ffmpeg: drop redundant frame_pts value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-16 16:42:20 +01:00
Anshul Maheshwari bb0344dc55 ffmpeg: improve data stream support
This adds data codec/stream handling where previously there was only
audio/video/subtitles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-16 02:52:04 +01:00
raxon1s 4184d344af ffmpeg: Add bitrate value under -progress action
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-16 00:31:08 +01:00
Michael Niedermayer 0409155261 ffmpeg: remove unneeded NULL pointer check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 15:55:07 +01:00
Michael Niedermayer 6d1a2efb8a ffmpeg: Clear error message array at init.
This avoids printing uninitialized bytes if no error message is set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 23:02:30 +01:00
Michael Niedermayer 78cb3c069d ffmpeg: Use avio_closep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 14:10:58 +01:00