summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* avformat/utils: Move ff_stream_encode_params_copy() to mux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | Only used by muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move av_stream_get_end_pts() to mux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | It is only to be used with muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move avformat_query_codec() to mux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | It is obviously muxer-only. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_format_output_open() to mux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | It is obviously a muxing-only function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move creation-time functions to mux_utilsAndreas Rheinhardt2022-05-10
| | | | | | Only used by muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_get_packet_palette() to rawutils.cAndreas Rheinhardt2022-05-10
| | | | | | | | | | ff_get_packet_palette() and ff_reshuffle_raw_rgb() belong together: E.g. the former takes the return value of the latter as argument. So move ff_get_packet_palette() to rawutils.c (which consists solely of ff_reshuffle_raw_rgb()). Also add a separate header for these two functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux_utils: Move ff_format_shift_data to new file for mux utilsAndreas Rheinhardt2022-05-10
| | | | | | | | It is only used by muxers. Given that it is not part of the core muxing code and given that mux.c is already big enough, it is moved to a new file for utility functions for muxing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move stream_options, avformat_new_stream to options.cAndreas Rheinhardt2022-05-10
| | | | | | | | | This is the appropriate place given that AVStream is about to become an AVOpt-enabled struct. Also move av_disposition_(to|from)_string, as these are tied to the disposition stream option. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_stream_add_bitstream_filter to mux.cAndreas Rheinhardt2022-05-10
| | | | | | | It is muxing-only; in fact, it should be considered part of the core muxing code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Move ff_choose_chroma_location to mxfenc, its only userAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Move ff_choose_timebase to nutenc, its only userAndreas Rheinhardt2022-05-10
| | | | | | (This function does not seem to abide by its documentation.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/internal: Move muxing-only functions to new mux.h headerAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Use av_realloc_array for reallocating arrayAndreas Rheinhardt2022-05-10
| | | | | | | | | | Also improve the size check a bit; given that av_realloc_array() checks for overflow itself, we only have to check for nb_side_data + 1 still being representable in an int. But given that we can check for representability in size_t at no additional cost we do so as it leads to a nicer error code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lib*/version: Move library version functions into files of their ownAndreas Rheinhardt2022-05-10
| | | | | | | This avoids having to rebuild big files every time FFMPEG_VERSION changes (which it does with every commit). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/dhav: Don't truncate return value of avio_skip()Andreas Rheinhardt2022-05-10
| | | | | | | Fixes demuxing files bigger than INT_MAX. Reported-by: jenster Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mov: fix timecode with rounded down tmcd nb_framesMarton Balint2022-05-09
| | | | | | | Regression since 8dd5bb728038f21d17ec789e21d65fe8f3f364a6. Fixes ticket #5978. Signed-off-by: Marton Balint <cus@passwd.hu>
* libavformat/asfdec: remove unused parameterssoftworkz2022-05-08
| | | | | Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: fix use invalid box size/type due to eofZhao Zhili2022-05-08
|
* avformat/mov: reindent after previous commitZhao Zhili2022-05-08
|
* avformat/mov: remove an always true conditionZhao Zhili2022-05-08
|
* lavf/cavsvideodec: Add GuangDian profile supportJun Zhao2022-05-08
| | | | | | Enable the Guangdian profile support Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/hlsenc: remove unnecessary http/https shutdown status operateSteven Liu2022-05-07
| | | | | | | | | | Fix ticket: 9010 there have been get http/https shutdown status in ffurl_shutdown. so unnecessary http/https shutdown status operate. Tested-by: RytoEX Tested-by: ushadow Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/libzmq: Improve r redundancy in occuredMichael Niedermayer2022-05-06
| | | | Reviewed-by: "mypopy@gmail.com" <mypopy@gmail.com>
* avformat/jvdec: Remove redundant ;Michael Niedermayer2022-05-06
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: skip call ff_codec_get_id if possibleZhao Zhili2022-05-04
| | | | | | | ff_codec_get_id loops over ff_codec_movvideo_tags (which is a large array) two times. The result is unused most of the cases. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* movenc: add write_btrt optionerankor2022-05-02
| | | | | | | supports forcing or disabling the writing of the btrt atom. the default behavior is to write the atom only for mp4 mode. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/movenc: sidx earliest_presentation_time is applied after editlistZhao Zhili2022-04-29
| | | | | | Fix #8334 Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/jpegxl_probe: Fix potential incorrect and UB shiftAndreas Rheinhardt2022-04-29
| | | | | | Fixes Coverity issue #1504273. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/format: Also search for image2-codecs for image2pipeAndreas Rheinhardt2022-04-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/fitsenc: Simplify writing header paddingAndreas Rheinhardt2022-04-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/tls_mbedtls: add support for mbedtls version 3Timo Rothenpieler2022-04-27
| | | | | | | | | | | - certs.h is gone. Only contains test data, and was not used at all. - config.h is renamed. Was seemingly not used, so can be removed. - MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE is gone, instead MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE will be thrown. - mbedtls_pk_parse_keyfile now needs to be passed a properly seeded RNG. Hence, move the call to after RNG seeding. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avformat/mov: log the right variableZhao Zhili2022-04-27
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* libavformat/rtsp: pkt_size option is not honored in rtspYubo Xie2022-04-27
| | | | | Signed-off-by: xyb <xyb@xyb.name> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/mov: fix missing extra data updatingZhao Zhili2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | The stsc_index is checked and updated for the next sample. If the next sample needs to update stsd_index and stsc_index, then only stsc_index is updated, which leads to a missing AV_PKT_DATA_NEW_EXTRADATA. For example, the sample in the second chunk needs to update both. entry[0] first_chunk = 1 samples_per_chunk = 3 sample_description_index = 1 entry[1] first_chunk = 2 samples_per_chunk = 1 sample_description_index = 2 entry[2] first_chunk = 3 samples_per_chunk = 8 sample_description_index = 2 The fix is simple: first check and update stsd_index for current sample, then check and update stsc_index for the next. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/mov: Add avif to list of supported extensionsVignesh Venkatasubramanian2022-04-25
| | | | | | | | AVIF still and animations are now supported by the MOV parser. Add the "avif" extension to the list of supported extensions to AVInputFormat. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
* avformat/version: bump minor version for Jpeg XLLeo Izen2022-04-23
| | | | | The version.h bump got missed with the Jpeg XL patchset. This should bump the minor version in accordance with the contributing guidelines.
* avformat/image2: add Jpeg XL as image2 formatLeo Izen2022-04-23
| | | | | This commit adds support to libavformat for muxing and demuxing Jpeg XL images as image2 streams.
* avformat/mov: Add support for still image AVIF parsingVignesh Venkatasubramanian2022-04-23
| | | | | | | | | | | This patch supports AVIF still images conforming to the final specification that have exactly one item (i.e. no alpha channel). The iloc box is parsed and the mov index populated. Partially fixes #7621. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
* avformat/mov: fix timecode with high frame rate contentMarton Balint2022-04-22
| | | | | | | | | | | | | | | | | | | | 60 fps content have "Number of Frames" set to 30 in the tmcd atom, but the frame duration / timescale reflects the original video frame rate. Therefore we multiply the frame count with the quotient of the rounded timecode frame rate and the "Number of Frames" per second to get a frame count in the original (higher) frame rate. Note that the frames part in the timecode will be in high frame rate which will make the timecode different to e.g. MediaInfo which seems to show the 30 fps timecode even for 120 fps content. Regression since 428b4aacb1a91a267650de644519882a5f700388. Fixes ticket #9710. Fixes ticket #9492. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/rtmpproto: send proper status for response to play commandMarton Balint2022-04-22
| | | | | | | | This fixes referencing the uninitialized filename variable. Fixes ticket #9711. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/genh: Check sample rateMichael Niedermayer2022-04-21
| | | | | | | | | Fixes: signed integer overflow: -2515507630940093440 * 4 cannot be represented in type 'long' Fixes: 46318/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5009637474172928 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/demux: Use unsigned to check duration vs duration_textMichael Niedermayer2022-04-21
| | | | | | | | | Fixes: signed integer overflow: 9223371898743775808 - -138111000000 cannot be represented in type 'long' Fixes: 46245/clusterfuzz-testcase-minimized-ffmpeg_dem_OGG_fuzzer-5075129786302464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* librtmp: use AVBPrint instead of char *Tristan Matthews2022-04-19
| | | | | | | This avoids having to do one pass to calculate the full length to allocate followed by a second pass to actually append values. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/ipfsgateway: define PATH_MAXMark Gaiser2022-04-14
| | | | | | | | | PATH_MAX is posix. Some compilers (MSVC) don't define this thus failing to compile the ipfsgateway file. Defining it fixes the compile. Signed-off-by: Mark Gaiser <markg85@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Add IPFS protocol support.Mark Gaiser2022-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for: - ffplay ipfs://<cid> - ffplay ipns://<cid> IPFS data can be played from so called "ipfs gateways". A gateway is essentially a webserver that gives access to the distributed IPFS network. This protocol support (ipfs and ipns) therefore translates ipfs:// and ipns:// to a http:// url. This resulting url is then handled by the http protocol. It could also be https depending on the gateway provided. To use this protocol, a gateway must be provided. If you do nothing it will try to find it in your $HOME/.ipfs/gateway file. The ways to set it manually are: 1. Define a -gateway <url> to the gateway. 2. Define $IPFS_GATEWAY with the full http link to the gateway. 3. Define $IPFS_PATH and point it to the IPFS data path. 4. Have IPFS running in your local user folder (under $HOME/.ipfs). Signed-off-by: Mark Gaiser <markg85@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vbnenc: add VBN encoderMarton Balint2022-04-10
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/vbndec: add VBN decoderMarton Balint2022-04-10
| | | | | | | | Add support for decoding Vizrt Binary Image (VBN) files. LZW-compressed data is not supported yet. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/codec2: remove surplus include 'memory.h' statementPeter Ross2022-04-09
| | | | | | | | on glibc memory.h drags in string.h, but codec2 does not use any str* or mem* functions. additionally, memory.h is not part of the C99 or POSIX standards. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts.c: ignore a section with next flagTADANO Tokumei2022-04-09
| | | | | | | | | | | 'current_next_indicator' of 0 (next) on each section header indicates the service information is for immediate future one. ffmpeg doesn't need to parse it but current (1) one. ref: section 5.1.1 of DVB BlueBook A038 (EN 300 468) Signed-off-by: TADANO Tokumei <aimingoff@pc.nifty.jp> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts.c: fix to check end of each descriptor of SDTTADANO Tokumei2022-04-09
| | | | | | | | Current code incorrectly check against end of section rather than end of descriptor. Signed-off-by: TADANO Tokumei <aimingoff@pc.nifty.jp> Signed-off-by: Marton Balint <cus@passwd.hu>