summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/utils: fix logic error in ff_mkdir_pPeter Ross2022-02-16
| | | | | | Fix ticket# 9605 Signed-off-by: Peter Ross <pross@xvid.org>
* avformat/argo_cvg: Fix checksumMichael Niedermayer2022-02-15
| | | | | | Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Corner case encryption error cleanup in mov_read_senc()Michael Niedermayer2022-02-15
| | | | | | | | Fixes: memleak Fixes: 42341/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4566632823914496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/id3v2: Add Grouping frame to id3v2.4 metadata tableWolfgang Müller2022-02-15
| | | | | | | | | | | | | | | | | The ID3v2.4.0 standard defines TIT1 as the "Content group description" tag [1]. This frame is usually referred to as the "Grouping" tag and in de-facto use under that name by Vorbis and APEv2 [2]. This commit introduces a mapping from "TIT1" to "grouping" in the id3v2.4 metadata conversion table. This will enable software to access it using that name. In particular, MPD will now read this tag correctly when using the ffmpeg decoder plugin. [1] https://id3.org/id3v2.4.0-frames (4.2.1) [2] https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html#grouping-3 Signed-off-by: Wolfgang Müller <wolf@oriole.systems> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat/gnutls: Use the systems default crypto policyAndreas Schneider2022-02-15
| | | | | | | | We should use the systems crypto policy by default. If there is no system policy, gnutls will use the "NORMAL" policy. Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avisynth: use AviSynth+'s frame properties to set various fieldsStephen Hutchinson2022-02-13
| | | | | | | | | | | | | | | * Field Order * Chroma Location * Color Transfer Characteristics * Color Range * Color Primaries * Matrix Coefficients The existing TFF/BFF detection is retained as a fallback for older versions of AviSynth that can't access frame properties. The other properties have no legacy equivalent to detect them. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avisynth: corrected interlace detectionemcodem2022-02-13
| | | | | | | | | | | | | | | AviSynth works on frame-based video by default, which can be either progressive or interlaced. Some filters can break frames into half-height fields, at which point it considers the clip to be field-based (avs_is_field_based can be used to check for this situation). To properly detect the field order of a typical video clip, the frame needs to have been weaved back together already, so avs_is_field_based should actually report 'false' when checked. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avformat/udp: remove IPPROTO_IPV6 macroLimin Wang2022-02-12
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/udp: Fix IP_MULTICAST_TTL for BSD compatibilityLimin Wang2022-02-12
| | | | | | | | | | Suggested by zhilizhao, vlc project has solved the compatibility by the same way, so I borrowed the comments from vlc project. Fixes ticket #9449 Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/udp: use one setsockopt for ipv4/ipv6Limin Wang2022-02-12
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/udp: properly check for valid ttl in urlLimin Wang2022-02-12
| | | | | | | Zhao Zhili added a ttl upper bound in commit 9daac85da8, but the check for ttl in url is missing still. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* http: Send a Range header even when the offset is 0Justin Ruggles2022-02-11
| | | | | | | Using Range allows for getting the full file size from the Content-Range header in the response, even if the server sends back the response using chunked Transfer-Encoding, which does not allow using Content-Length.
* http: Improve handling of Content-Range with Transfer-Encoding:chunkedJustin Ruggles2022-02-11
| | | | | | | When Transfer-Encoding:chunked is used, the client must ignore a Content-Length header, if present. However, it should not ignore a Content-Range header, which also includes the full size of the entity.
* avformat/mpegts: initialize max_packet_size when sub-demuxerGyan Doshi2022-02-10
| | | | | | | | | | | bca30570d2 added a user option to set max_packet_size replacing a hardcoded value. This had a side-effect of leaving the field set to 0 when packet demuxing is carried out from another demuxer using avpriv functions, which could lead to demux failure. Hardcoded max_packet_size inside avpriv_mpegts_parse_open to 2048000 to avoid this. Value chosen to be 10x that of default value to accommodate large payloads.
* avformat/hls: Use unsigned for iv computationMichael Niedermayer2022-02-09
| | | | | | | | | Fixes: signed integer overflow: 9223372036854775748 + 60 cannot be represented in type 'long' Fixes: 44417/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5802443881971712 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/matroskadec: Check desc_bytesMichael Niedermayer2022-02-09
| | | | | | | | Fixes: Division by 0 Fixes: 44035/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4826721386364928 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: Fix invalid NULL pointer operation in ff_parse_key_value()Michael Niedermayer2022-02-09
| | | | | | | | Fixes: pointer index expression with base 0x000000000000 overflowed to 0xffffffffffffffff Fixes: 44012/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5670607746891776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/matroskadec: Fix infinite loop with bz decompressionMichael Niedermayer2022-02-09
| | | | | | | | | | | The same check is added to zlib too, it seems not needed there though Fixes: Infinite loop Fixes: 43932/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-6175167573786624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: keep chapter monotonicity on chapter updatesMichael Niedermayer2022-02-09
| | | | | | | | | Updating a chapter with the same id does not break monotonicity Fixes: Timeout Fixes: 43727/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4960623367159808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hls: Implement support for using AVSEEK_FLAG_BACKWARD when seekingGustav Grusell2022-02-09
| | | | | | | | | Before, seeking in hls streams would always seek to the next keyframe after the given timestamp. With this fix, if seeking in videostream and AVSEEK_FLAG_BACKWARD is set, seeking will be to the first keyframe of the segment containing the given timestamp. This fixes #7485. Signed-off-by: Gustav Grusell <gustav.grusell@gmail.com>
* avcodec/internal.h: Move avpriv_find_start_code() to startcode.hAndreas Rheinhardt2022-02-08
| | | | | | | | This is by definition the appropriate place for it. Remove all the now unnecessary libavcodec/internal.h inclusions; also remove other unnecessary headers from the affected files. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Remove unnecessary libavcodec/internal.h inclusionsAndreas Rheinhardt2022-02-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/async: switch to new FIFO APIAnton Khirnov2022-02-07
|
* lavf/udp: switch to new FIFO APIAnton Khirnov2022-02-07
|
* lavf/swfenc: switch to new FIFO APIAnton Khirnov2022-02-07
|
* lavf/mpegenc: switch to new FIFO APIAnton Khirnov2022-02-07
|
* lavf/dvenc: switch to new FIFO APIAnton Khirnov2022-02-07
|
* lavf/dvenc: return an error on audio/video desyncAnton Khirnov2022-02-07
|
* avformat/rtpproto: set ttl upper bound to 255Zhao Zhili2022-02-06
| | | | | | Also remove bogus millisecond reference from help text. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/udp: set ttl upper bound to 255Zhao Zhili2022-02-06
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add avlanguage dependencyZane van Iperen2022-02-06
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: cosmeticsZane van Iperen2022-02-05
| | | | | | s/++i/i++/g Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/tests: add /imf to .gitignorePierre-Anthony Lemieux2022-02-05
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/demux: don't truncate the return value of ts_to_samples()James Almer2022-02-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/demux: print skip_samples and discard_padding as unsigned values in ↵James Almer2022-02-05
| | | | | | | | | debug log It's the type they should be interpreted as in the AV_PKT_DATA_SKIP_SAMPLES side data. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/demux: don't propagate unsupported skip samples packet side data valuesJames Almer2022-02-05
| | | | | | Should fix ticket #9622 Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/imf_cpl: do not use filesize when reading XML fileMarton Balint2022-02-05
| | | | | | Similar to the earlier patch applied to imfdec. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/rtpdec_rfc4175: fix interlace formatPatrick Keroulas2022-02-05
| | | | | | | | | | | | | In previous state, a new frame was allocated on each timestamp step, i.e. each frame/field transition. However, for interlace, a new frame should be allocated on 1st field, completed with the 2nd and finally freed. This commit fixes the frame allocation and the detection of missing RTP markers. Signed-off-by: Patrick Keroulas <patrick.keroulas@radio-canada.ca> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/img2dec: increase probe score for GEM image fourcc variantsPeter Ross2022-02-04
| | | | Signed-off-by: Peter Ross <pross@xvid.org>
* avformat/img2dec: fix logic error in GEM Raster file probePeter Ross2022-02-04
| | | | | | | | Use correct logic to express limits of the planes and pattern_size fields. Fix ticket# 9605 Signed-off-by: Peter Ross <pross@xvid.org>
* Add MKV tags for AVS2 and AVS3 codecs.TianBo Zheng2022-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: TianBo Zheng <naturalwalker@hotmail.com> MKV codec mappings: V_AVS2 and V_AVS3 (https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md) Encoding tool: Ffmpeg with AVS2/AVS3 enabled: https://github.com/xatabhk/FFmpeg-avs2-avs3/releases Command line: ffmpeg -i xxxx.mp4 -vcodec avs2 -acodec copy xxxx_avs2.mkv ffmpeg -i xxxx.mp4 -vcodec avs2 -speed_level 4 -acodec copy xxxx_avs2.mkv` Players: (1) Ffmpeg with avs2/avs3 enabled: (https://github.com/xatabhk/FFmpeg-avs2-avs3/releases): Command line: ffplay xxxx_avs2.mkv ffplay xxxx_avs3.mkv (2) VLC 3.0.x with AVS2/AVS3 enabled: https://github.com/xatabhk/vlc-3.0-avs2-avs3/releases (3) Mpc-hc 1.9.x with AVS2/AVS3 enabled: https://gitee.com/zhengtianbo/cavs-avs2-avs3_decoder_added_to_mpc_hc/releases AVS2/AVS3 MKV samples: https://github.com/xatabhk/avs2-avs3-video-samples Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mov: Check size before subtractionMichael Niedermayer2022-02-01
| | | | | | | | Fixes: signed integer overflow: -9223372036854775808 - 8 cannot be represented in type 'long' Fixes: 43542/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5237670148702208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/http: Fix double-free on errorAndreas Rheinhardt2022-02-01
| | | | | | | | | | | av_dict_set() with AV_DICT_DONT_STRDUP_VAL takes ownership of the string it is passed to as val; this includes freeing it on error. Fixes Coverity issue #1497468. Reviewed-by: Eran Kornblau <eran.kornblau@kaltura.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* http: remove cache_redirect optionerankor2022-01-31
| | | | | | | | | following 625ea2d, redirect caching is performed according to the http response headers, there's no need to have it as an option - always start from the original uri, and apply any redirects according to the redirect_cache dictionary. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avformat/dashdec: avoid calling strlen multiple timesLimin Wang2022-01-30
| | | | | Reviewed-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec: return value check for init_get_bits()Limin Wang2022-01-30
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec: Fix negative missed packets in warning messageLimin Wang2022-01-30
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/matroskadec: Export rectangular projection as displaymatrixAndreas Rheinhardt2022-01-29
| | | | | | | This is the officially supported way to express rotations and flips in Matroska. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hls: Remove redundant castAndreas Rheinhardt2022-01-21
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Peek into the muxing queue for avoid_negative_tsAndreas Rheinhardt2022-01-21
| | | | | | | | | | | Peeking into the muxing queue can improve the estimate of the lowest timestamp needed for avoid_negative_ts in case the lowest timestamp is in a packet other than the first packet to be muxed. This fixes tickets #4536 and #5784 as well as the output from the matroska-avoid-negative-ts FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>