summaryrefslogtreecommitdiffstats
path: root/fftools
Commit message (Collapse)AuthorAgeFilesLines
* fftools/ffmpeg_opt: Fix mixed declarations and codeAndreas Rheinhardt2019-11-061-2/+4
| | | | | | | Introduced in ed3c317d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Free swresample dictionary during cleanupAndreas Rheinhardt2019-10-251-0/+1
| | | | | | | | | | Freeing this was forgotten in ad899522. Fixes #8315 and #8316. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg_opt: add error handle if av_asprintf return nullJun Zhao2019-10-181-0/+6
| | | | | | | add error handle if av_asprintf return null. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* ffprobe: fix output of packets_and_frames section in JSON formatJames Almer2019-10-141-3/+7
| | | | | | | | | The "type" entry was hardcoded with an trailing comma, even if it was the only entry in the section. Fixes ticket #8228. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg: Improve streamcopyAndreas Rheinhardt2019-10-121-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do_streamcopy() has a packet that gets zero-initialized first, then gets initialized via av_init_packet() after which some of its fields are oerwritten again with the actually desired values (unless it's EOF): The side data is copied into the packet with av_copy_packet_side_data() and if the source packet is refcounted, the packet will get a new reference to the source packet's data. Furthermore, the flags are copied and the timestamp related fields are overwritten with new values. This commit replaces this by using av_packet_ref() to both initialize the packet as well as populate its fields with the right values (unless it's EOF again in which case the packet will still be initialized). The differences to the current approach are as follows: a) There is no call to a deprecated function (av_copy_packet_side_data()) any more. b) Several fields that weren't copied before are now copied from the source packet to the new packet (e.g. pos). Some of them (the timestamp related fields) may be immediately overwritten again and some don't seem to be used at all (e.g. pos), but in return using av_packet_ref() allows to forgo the initializations. c) There was no check for whether copying side data fails or not. This has been changed: Now the program is exited in this case. Using av_packet_ref() does not lead to unnecessary copying of data, because the source packets are already always refcounted (they originate from av_read_frame()). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cmdutils: trailing options may be ignoredLou Logan2019-10-011-2/+2
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: mypopy <mypopy@gmail.com>
* ffmpeg_opt: remove errant spaceLou Logan2019-09-271-1/+1
| | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* doc/ffmpeg: -timelimit is in user timeLou Logan2019-09-271-1/+1
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg_opt: Fix signed integer overflowAndreas Rheinhardt2019-09-171-2/+4
| | | | | | | Fixes ticket #8154. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cmdutils: promote report level if loglevel is higherGyan Doshi2019-09-131-2/+9
|
* ffmpeg: switch to avformat_seek_file for stream_loopGyan Doshi2019-09-051-1/+1
| | | | | Fixes stream_loop with very short files where seeking is generic index search
* avcodec/videotoolbox: add support for full range pixel formatsAkemi2019-09-041-2/+4
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* fftools: Use right function signature and pointersAndreas Rheinhardt2019-08-153-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option tables of the various fftools (in particular ffprobe) are arrays of OptionDef; said type contains a union of a pointer to void and a function pointer of type int (*)(void *, const char *, const char *) as well as a size_t. Some entries (namely the common entry for writing a report as well as several more of ffprobe's entries) used the pointer to void to store a pointer to functions of type int (*)(const char *) or type int (*)(const char *, const char *); nevertheless, when the functions are actually called in write_option (in cmdutils.c), it is done via a pointer of the first type. There are two things wrong here: 1. Pointer to void can be converted to any pointer to incomplete or object type and back; but they are nevertheless not completely generic pointers: There is no provision in the C standard that guarantees their convertibility with function pointers. C90 lacks a generic function pointer, C99 made every function pointer a generic function pointer and still disallows the convertibility with void *. 2. The signature of the called function differs from the signature of the pointed-to type. This is undefined behaviour in C99 (given that C90 lacks a way to convert function pointers at all, it doesn't say anything about such a situation). It only works because none of the functions this patch is about make any use of their parameters at all. Therefore this commit changes the type of the relevant functions to match the type used for the call and uses the union's function pointer to store it. This is legal even in C90. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffplay: properly detect all window size changesMarton Balint2019-08-141-1/+1
| | | | | | | | | | | | | | SDL_WINDOWEVENT_SIZE_CHANGED should be used instead of SDL_WINDOWEVENT_RESIZED because SDL_WINDOWEVENT_RESIZED is only emitted if the resize happened due to an external event. Fixes ticket #8072. Additional references: https://bugzilla.libsdl.org/show_bug.cgi?id=4760 https://wiki.libsdl.org/SDL_WindowEventID Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg_opt: Respect default disposition when select audio/videoJun Zhao2019-07-031-2/+4
| | | | | | | Respect default disposition when select audio/video Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* ffprobe: Fix memory leakDerek Buitenhuis2019-06-211-3/+1
| | | | | | This packet was not necessarily unreferenced. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* ffmpeg_hw: Treat empty device string as no device settingMark Thompson2019-06-021-5/+8
| | | | | | | The implementation will use some default in this case. The empty string is not a meaningful device for any existing hardware type, and indeed OpenCL treats it identically to no device already to work around the lack of this setting on the command line.
* ffmpeg_hw: Mark some strings as constMark Thompson2019-06-022-2/+2
|
* fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)Antonin Gouzer2019-05-271-1/+17
| | | | | | Slightly modified by Marton Balint to produce valid json as well. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: added option always on top for video windowDaniel Kucera2019-05-201-0/+8
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Daniel Kucera <github@danman.eu>
* libavformat: improve logs with cur_dtsAndreas Hakon2019-04-191-1/+3
| | | | | | | | | | | This patch improves the logs when the message "cur_dts is invalid" appears. If helps to identify which stream generates the trouble, and the status of the stream. A lot of users suffers with the message, and the origin varies. The improved message can help to discover the cause. Signed-off-by: Andreas Hakon <andreas.hakon@protonmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/videotoolbox: add support for 10bit pixel formatfumoboy0072019-04-161-0/+3
| | | | | this patch was originally posted on issue #7704 and was slightly adjusted to check for the availability of the pixel format.
* fftools/ffmpeg: Check if we do have also a filter_complex filter.Thierry Foucu2019-03-281-0/+1
| | | | | | | | | | | | | | | | | Right now, the code check for no filter description, but if we use a filter_complex, the code will use the AVFrame.duration which could be wrong in case of using fps filter. How to reproduce the problem: ffmpeg -f lavfi -i testsrc=duration=1 -vf fps=fps=50 -vsync 1 -f null - output 50 frames ffmpeg -f lavfi -i testsrc=duration=1 -filter_complex fps=fps=50 -vsync 1 -f null - output 51 frames With this commit, the same command will always output 50 frames. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '7e5bde93a1e7641e1622814dafac0be3f413d79b'James Almer2019-03-101-1/+1
| | | | | | | * commit '7e5bde93a1e7641e1622814dafac0be3f413d79b': build: Rename OBJDIRS variable to OUTDIRS Merged-by: James Almer <jamrial@gmail.com>
* ffmpeg_filter: initialize sub2video.end_pts together with last_ptsJan Ekström2019-02-211-0/+1
| | | | | | | | | | | This way re-initializations properly update end_pts, enabling sub2video_heartbeat to call sub2video_update as expected to re-init the sub2video AVFrame's contents and to feed a frame into the filter chain. This then fixes memory usage ballooning due to framesync waiting for secondary input in case of no actual subtitle samples being present for a while in source after a re-init occurs.
* ffplay: add support for setting the number of filter threadsMarton Balint2019-02-071-0/+4
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: add missing avfilter_graph_alloc result checkMarton Balint2019-02-071-11/+6
| | | | | | Also do not allocate a graph at start, we will reallocate it anyway. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: use different decoder names for each media typeMarton Balint2019-02-071-5/+5
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg_opt: Print a warning if more than one -vf/-af option was specified.Carl Eugen Hoyos2019-01-151-0/+4
| | | | Fixes ticket #4184.
* ffmpeg: allow disabling streams by type for inputsGyan Doshi2019-01-031-0/+7
| | | | | | -vn/-an/-sn/-dn now works for input. Streams are still registered in input_streams but they can't be automatically selected or mapped or filtered.
* ffmpeg: skip disabled streamsGyan Doshi2019-01-022-2/+36
| | | | | | | | Fully discarded streams can't be selected for output or mapped or filtered. Previously, a few packets from such streams, probably buffered for stream probing, would get smuggled into output files. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: improve the intra stream discontinuity messageJan Ekström2018-12-181-1/+4
| | | | | | Now it actually tells which stream from which input and of which type had an absolute DTS discontinuity larger than dts_delta_threshold.
* ffplay: fix -x and -y options when only one of them is usedMarton Balint2018-12-021-8/+7
| | | | | | | | | | Previously if only -y was used then nothing happened, if only -x then zero window height was set which is undefined in SDL and caused a black window. From now on if only one dimension is set we calculate the other based on size/aspect of the shown content. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: convert float math to int math in calculate_display_rectMarton Balint2018-12-021-13/+9
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: Avoid duplicating Closed Captions when increasing frame rate.Carl Eugen Hoyos2018-11-271-0/+2
| | | | Fixes ticket #7506.
* fftools/ffmpeg: delete the unused code.Jun Zhao2018-11-271-8/+1
| | | | | | | There are come from 2012 ago and have never been used from this time. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* fftools/ffprobe: Indent the code.Jun Zhao2018-11-271-14/+14
| | | | | | commit 196765a7cc4 missed the reindet. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* fftools/ffmpeg: Repair reinit_filter featureMichael Niedermayer2018-11-161-3/+7
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Indent the codeJun Zhao2018-11-111-64/+64
| | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* fftools/ffmpeg: Put the variable declaration at uppper for block.Jun Zhao2018-11-111-5/+2
| | | | | | | move the variable declaration at start of upper for block and remove the redundant brace. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* fftools/ffmpeg: Remove the micor like "#if 1"Jun Zhao2018-11-111-6/+0
| | | | | | They are come from 2003 and delete them. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* ffmpeg: log corrupted packets and framesMarton Balint2018-10-141-6/+10
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: check return value of avcodec_parameters_from_contextMarton Balint2018-10-091-1/+7
| | | | | | Fixes Coverity CID 1427273. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: add options to specify window positionDave Rice2018-10-071-1/+5
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: break loop when dts_heuristic check donexiaofeng2018-09-301-1/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: block output == input for filesGyan Doshi2018-09-171-1/+15
| | | | Fixes #4655
* ffplay: add option to allow custom seek intervalGyan Doshi2018-09-051-3/+5
| | | | At present, left and right keys are hardcoded to seek by 10 seconds.
* ffplay: do not drain existing filters when seekingMarton Balint2018-09-011-0/+2
| | | | | | | After a seek we drop all frames from the filter anyway. Audio filters already had a similar approach. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: add correct field for raw pts in -progress reportGyan Doshi2018-08-281-0/+2
| | | | | | | | | PTS is in microseconds, so correct field name is out_time_us. Old field out_time_ms kept for now - will be removed after a suitable transition period. Fixes #7345
* ffmpeg: simplify refcounting packets for the muxing queueJames Almer2018-08-071-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
OpenPOWER on IntegriCloud