summaryrefslogtreecommitdiff
path: root/ffmpeg.c
Commit message (Collapse)AuthorAge
* ffmpeg: copy color properties in case of -c:v copy.Ronald S. Bultje2016-05-10
| | | | | | | | I have no idea why the first hunk uses ost->enc_ctx, because as far as I understand, that is never used in case of -c:v copy, but this code block is only entered if encoding_needed=0, which means stream_copy=1. My point being: review from someone that knows this really well would be appreciated.
* Merge commit '5d273d3efac340ef8de445c955ff44c7abed4e8f'Derek Buitenhuis2016-05-08
|\ | | | | | | | | | | | | * commit '5d273d3efac340ef8de445c955ff44c7abed4e8f': avconv: VAAPI hwcontext initialisation and hwaccel helper Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | vp9: add superframe merging bitstream filter.Ronald S. Bultje2016-03-11
| | | | | | | | Fixes ticket 4313.
* | lavf: allow BSFs to drop packets.Ronald S. Bultje2016-03-11
| | | | | | | | | | If pkt->size == 0 && pkt->side_data_elems == 0 after bsf->filter() returns, the packet is considered dropped.
* | ffmpeg: set sub_text_format to ass (without timing) by defaultClément Bœsch2016-02-26
| | | | | | | | Fixes Ticket #4783
* | Merge commit 'c15f6098b1b25689dd5e86aeb5ce69bc12efe1e1'Derek Buitenhuis2016-02-24
|\| | | | | | | | | | | | | * commit 'c15f6098b1b25689dd5e86aeb5ce69bc12efe1e1': avconv: pass the hw context from filters to the encoder Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | ffmpeg: init input streams before opening encodersMarton Balint2016-02-19
| | | | | | | | | | | | | | | | | | | | | | | | Codec options of streams detected during avformat_find_stream_info are not set therefore without this patch we initialize the encoders with decoder info based on decoders without options. This cause problems for probed DVB teletext streams where avctx->subtitle_header depend on the txt_format setting. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffmpeg: Check best_effort_timestamp after rescaleMichael Niedermayer2016-02-18
| | | | | | | | | | | | | | Fixes integer overflow Fixes: Ticket5126 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: replace "flush Media" with "flush_media" in benchmark_all outputStefano Sabatini2016-01-29
| | | | | | | | Simplify parsing and consistency.
* | Merge commit '63f7f8d1dbf6ce27440fdd56ef38c822fb11b9c2'Hendrik Leppkes2016-01-19
|\| | | | | | | | | | | | | * commit '63f7f8d1dbf6ce27440fdd56ef38c822fb11b9c2': avconv: Drop an impossible check Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | Merge commit '7ebf1b4adad40e2b0d88ebd5cfde821a7a0ceab2'Hendrik Leppkes2016-01-19
|\| | | | | | | | | | | | | * commit '7ebf1b4adad40e2b0d88ebd5cfde821a7a0ceab2': avconv: Simplify poll_filters() return value check Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | ffmpeg: fix sws_dict leak on error exitMichael Niedermayer2016-01-17
| | | | | | | | | | | | | | Fixes: 1b79b985cdf860ffa228c00ee5497051/signal_sigsegv_1f99d24_3549_86d92054a79f6ff900fbaf03f8012b32.aif Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: check fclose return valuesGanesh Ajjanagadde2016-01-07
| | | | | | | | | | | | | | | | | | | | In the spirit of commit a956840cbc. Simple method to reproduce: pass -vstats_file /dev/full to ffmpeg. All raw fclose usages in ffmpeg.c taken care of here. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | ffmpeg: replace log2 by av_log2Ganesh Ajjanagadde2016-01-06
| | | | | | | | | | | | | | | | Slight change in output deemed irrelevant here. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | ffmpeg: check return value of avio_closep for progress reportGanesh Ajjanagadde2016-01-05
| | | | | | | | | | | | | | | | | | | | | | | | avio_closep is not guaranteed to succeed, and its return value can contain information regarding failure of preceding writes and silent loss of data (man 2 close, man fclose). Users should know when the progress was not successfully logged, and so a diagnostic is printed here. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | ffmpeg: use lavf API for applying bitstream filtersRodger Combs2015-12-28
| |
* | Merge commit 'e63e3797a1ed9346f529848e6ba3d27fd2d2cc8d'Hendrik Leppkes2015-12-17
|\| | | | | | | | | | | | | * commit 'e63e3797a1ed9346f529848e6ba3d27fd2d2cc8d': avconv: pass the global codec side data to the muxer Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | ffmpeg: add progress speed to status line and reportMoritz Barsnick2015-12-17
| | | | | | | | | | | | | | | | This adds a computation of the progress speed versus realtime ("Nx") to the status line and to the report log. It uses the progress time as already calculated for total output time as a base. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: change command line option -dump to work without -loglevel debugTom Marecek2015-12-11
| | | | | | | | | | | | | | | | | | | | -hex and -dump command line options do nothing unless -loglevel debug is set. -dump by itself is useful for monitoring live streams (to get the current PTS for example) however when it is used with -loglevel debug for an RTMP stream, librtmp also dumps the packet data which makes the output too noisy. do_pkt_dump is only set in check_keyboard_interaction or by the -dump command line option so this change should have no effect on any other parts of the code.. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: When streamcopying, only add the input seek position when copying ↵Simon Thelen2015-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | timestamps. Using -ss as an input option shifts timestamps down by the seek, so it doesn't have to be added to the recording time when checking whether to stop. Fixes #977 Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: enable echoing with command and debug modesClément Bœsch2015-12-04
| | | | | | | | Allow seeing text when pressing 'c' or 'd'.
* | ffmpeg: Check pkt_dts for AV_NOPTS_VALUEMichael Niedermayer2015-12-04
| | | | | | | | | | | | | | | | Fixes integer overflow Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_2039_8d1797aeb823ea43858d0fa45c9eb899.ogv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: fix -copy_prior_start 0 with -copyts and input -ssRodger Combs2015-11-20
| | | | | | | | | | | | Also rearranged the relevant check to reduce code duplication Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: preserve profile for audio stream copyMaksym Veremeyenko2015-11-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: Simplify fps code related to delta0Bryan Huh2015-11-16
| | | | | | | | | | | | | | | | Small refactor of fps code for improved readability. In particular the "cor" variable was unnecessary and misleading because it would always be set to -delta0. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: Fixing typos and adding comments to fps codeBryan Huh2015-11-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: Fix integer overflow with cur_dts being AV_NOPTS_VALUEMichael Niedermayer2015-11-11
| | | | | | | | Since de0e219a8aba72de201e85385c746cd1c04be1a2 cur_dts is sometimes invalid
* | ffmpeg: Print a warning if a pkt duration is already set before using the ↵Michael Niedermayer2015-11-11
| | | | | | | | | | | | | | | | | | frame rate I didnt find any case that triggers this but if it gets triggered it needs to be investigated Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: set muxer packet duration based on framerate only for CFRMichael Niedermayer2015-11-11
| | | | | | | | | | | | | | | | | | | | | | a set ost->frame_rate does not imply CFR in ffmpeg The changed fate tests had all wrong packet durations (like 1/1000 or 1/90000) There might be more cases in which is_cfr could be set Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'Hendrik Leppkes2015-11-10
|\| | | | | | | | | | | | | * commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4': avconv: set packet duration for CFR video streams Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | ffmpeg: Don't try and write sdp info if none of the outputs had an rtp format.Simon Thelen2015-11-09
| | | | | | | | | | | | | | 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>
* | all: use FFDIFFSIGN to resolve possible undefined behavior in comparatorsGanesh Ajjanagadde2015-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FFDIFFSIGN was created explicitly for this purpose, since the common return a - b idiom is unsafe regarding overflow on signed integers. It optimizes to branchless code on common compilers. FFDIFFSIGN also has the subjective benefit of being easier to read due to lack of ternary operators. Tested with FATE. Things not covered by this are unsigned integers, for which overflows are well defined, and also places where overflow is clearly impossible, e.g an instance where the a - b was being done on 24 bit values. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | ffmpeg: use log10 instead of log()/log(10)Ganesh Ajjanagadde2015-10-29
| | | | | | | | | | | | | | | | | | This is more concise and conveys the intent better. Furthermore, it is likely more precise as well due to lack of floating point division. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | Merge commit 'cd0e08813a0484002b5defbf557c859f123953ae'Hendrik Leppkes2015-10-29
|\| | | | | | | | | | | | | * commit 'cd0e08813a0484002b5defbf557c859f123953ae': avconv: support infinite loop for the loop option Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-27
| |
* | Merge commit 'a5d42043093a39636a1f4021a37dd9c612479f6f'Hendrik Leppkes2015-10-27
|\| | | | | | | | | | | | | * commit 'a5d42043093a39636a1f4021a37dd9c612479f6f': avformat: Always return ref-counted AVPacket Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | ffmpeg: add abort_on option to allow aborting on empty outputMarton Balint2015-10-22
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | Merge commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8'Hendrik Leppkes2015-10-22
|\| | | | | | | | | | | | | * commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8': avconv: add support for Intel QSV-accelerated transcoding Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | ffmpeg: exit on corrupt packets or decoded frames if exit_on_error flag is ↵Marton Balint2015-10-22
| | | | | | | | | | | | | | present Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffmpeg: factorize checking decoder resultMarton Balint2015-10-22
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffmpeg: exit on av_write_trailer failure if exit_on_error is setMarton Balint2015-10-22
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffmpeg: log failed av_write_trailerMarton Balint2015-10-22
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffmpeg: add deprecation guards around remaining AVFMT_RAWPICTURE usageHendrik Leppkes2015-10-14
| |
* | ffmpeg: remove trailing whitespace that sneaked into the previous mergeHendrik Leppkes2015-10-14
| |
* | Merge commit '16b0c929621f84983b83b9735ce973acb12723bc'Hendrik Leppkes2015-10-14
|\| | | | | | | | | | | | | * commit '16b0c929621f84983b83b9735ce973acb12723bc': avconv: Add loop option. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | ffmpeg: modify tty state when stderr is redirectedGanesh Ajjanagadde2015-10-11
| | | | | | | | | | | | | | Removes unnecessary isatty(), fixes Ticket2964 Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | ffmpeg: avoid possible undefined behaviorGanesh Ajjanagadde2015-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On lines 1633,1634 FFABS(pts) is performed. However, if av_stream_get_end_pts returns AV_NOPTS_VALUE always, pts remains stuck at INT64_MIN, leading to undefined behavior on FFABS. One could conceive of a solution using FFNABS. However, such a solution has to deal with the implementation defined rounding of integer division with at least one negative operand in ANSI C89. C99 forces truncation to zero, but I am not sure that all of our platforms compile with full C99 support, and in particular whether we can safely assume a fixed rounding behavior across all platforms. This solution is simple, and I doubt changing INT64_MIN to INT64_MIN + 1 has any practical loss - if it is stuck at its initial value, the stream is messed up anyway. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '6064f697a321174232a3fad351afb21150c3e9e5'Hendrik Leppkes2015-09-12
|\| | | | | | | | | | | | | * commit '6064f697a321174232a3fad351afb21150c3e9e5': lavc: Enable side data only packets by default Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | Remove left-over FF_API_DESTRUCT_PACKET cruftHendrik Leppkes2015-09-05
| |