summaryrefslogtreecommitdiff
path: root/fftools/ffprobe.c
Commit message (Collapse)AuthorAge
* fftools/ffprobe: show closed caption info in the stream dumpvectronic2020-05-02
| | | | | Signed-off-by: vectronic <hello.vectronic@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffprobe: support DOVI sidedataJun Zhao2020-04-23
| | | | | | support DOVI sidedata. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* remove CHAR_MIN/CHAR_MAX usagePaul B Mahol2020-03-17
| | | | It is not needed at all.
* fftools/ffprobe: Remove unneeded castsAndreas Rheinhardt2020-02-14
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffprobe: Fix fate tests for ffprobe in cases where TARGET_PATH differs from ↵Martin Storsjö2019-12-18
| | | | | | | | | | | | | | | | | | | the current path In these cases, we must pass the full path of the file to ffprobe (as the current working dir on the remote system, e.g. when invoked with "ssh remote ffprobe ..." isn't the wanted one). The input filename passed to ffprobe is also included in the output, which is part of the reference test data. Add a new option to ffprobe to allow overriding what path is printed, to keep the original relative path in the tests. An alternative approach could be an option to allow requesting omitting the file name from the dumped data, and updating the test references accordingly. Signed-off-by: Martin Storsjö <martin@martin.st>
* ffprobe: fix output of packets_and_frames section in JSON formatJames Almer2019-10-14
| | | | | | | | | 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: Use right function signature and pointersAndreas Rheinhardt2019-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ffprobe: Fix memory leakDerek Buitenhuis2019-06-21
| | | | | | This packet was not necessarily unreferenced. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)Antonin Gouzer2019-05-27
| | | | | | Slightly modified by Marton Balint to produce valid json as well. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffprobe: Indent the code.Jun Zhao2018-11-27
| | | | | | commit 196765a7cc4 missed the reindet. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* ffprobe: fix SEGV when new streams are addedAman Gupta2018-05-09
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* ffprobe: report unavailable SAR correctly in stream infoTimo Teräs2018-04-17
| | | | | | | | | av_guess_sample_aspect_ratio() will return undefined or missing value as {0,1}. This fixes show_stream() to check numerator to display 'N/A' when appropriate. show_frame() does this already correctly. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPALwm42018-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PSEUDOPAL pixel formats are not paletted, but carried a palette with the intention of allowing code to treat unpaletted formats as paletted. The palette simply mapped the byte values to the resulting RGB values, making it some sort of LUT for RGB conversion. It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8, GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap formats. The last one, GRAY8, is more common, but its treatment is grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming from typical Y video planes was not mapped to the correct RGB values. This cannot be fixed, because AVFrame.color_range can be freely changed at runtime, and there is nothing to ensure the pseudo palette is updated. Also, nothing actually used the PSEUDOPAL palette data, except xwdenc (trivially changed in the previous commit). All other code had to treat it as a special case, just to ignore or to propagate palette data. In conclusion, this was just a very strange old mechnaism that has no real justification to exist anymore (although it may have been nice and useful in the past). Now it's an artifact that makes the API harder to use: API users who allocate their own pixel data have to be aware that they need to allocate the palette, or FFmpeg will crash on them in _some_ situations. On top of this, there was no API to allocate the pseuo palette outside of av_frame_get_buffer(). This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes the pseudo palette optional. Nothing accesses it anymore, though if it's set, it's propagated. It's still allocated and initialized for compatibility with API users that rely on this feature. But new API users do not need to allocate it. This was an explicit goal of this patch. Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0. Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition, FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation functions manually changed to not allocating a palette.
* lav*,tests: remove several register_all callsJosh de Kock2018-04-02
| | | | | | | avdevice_register_all() is still required to register devices into lavf (this is required due to lavd being somewhat of a hack). Signed-off-by: Josh de Kock <josh@itanimul.li>
* ffprobe: fix infinite loop in subtitle decodingMarton Balint2018-03-12
| | | | | | | | | Fixes a regression since 2a88ebd096f3c748a2d99ed1b60b22879b3c567c which caused an infinite loop in the subtitle decoding. Fixes ticket #6796. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffprobe: remove usage of deprecation warning removal pragmasJames Almer2018-02-02
| | | | | | Fixes compilation in non Windows targets. Signed-off-by: James Almer <jamrial@gmail.com>
* ffprobe: Initialize coded_width/heightZhong Li2018-02-02
| | | | | | | | | | 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>
* fftools, tools, examples: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffprobe: remove usage of AVCodecContext accessorsJames Almer2017-11-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffprobe: remove usage of deprecated getter functionsJames Almer2017-10-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove use of deprecated AVFMT_FLAG_KEEP_SIDE_DATA flagJames Almer2017-10-29
| | | | | | | 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>
* Merge commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524'James Almer2017-10-01
* commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524': build: Move cli tool sources to a separate subdirectory Merged-by: James Almer <jamrial@gmail.com>