summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* lavc: deprecate AVCodecContext.ticks_per_frameAnton Khirnov2023-05-151-2/+13
| | | | | | | | For encoding, this field is entirely redundant with AVCodecContext.framerate. For decoding, this field is entirely redundant with AV_CODEC_PROP_FIELDS.
* lavf: use AV_CODEC_PROP_FIELDS where appropriateAnton Khirnov2023-05-153-18/+29
| | | | | | | | | | H.264 and mpeg12 parsers need to be adjusted at the same time to stop using the value of AVCodecContext.ticks_per_frame, because it is not set correctly unless the codec has been opened. Previously this would result in both the parser and lavf seeing the same incorrect value, which would cancel out. Updating lavf and not the parsers would result in correct value in lavf, but the wrong one in parsers, which would break some tests.
* avformat/hls: Try to implement RFC8216 playlist refusalMichael Niedermayer2023-05-151-1/+10
| | | | | | | | This should fix the regression since 6b1f68ccb04d791f0250e05687c346a99ff47ea1 Should fix Ticket10353 (please test and report cases that still fail) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: add ff_match_url_ext()Michael Niedermayer2023-05-152-0/+34
| | | | | | Match url against a list of extensions similar to av_match_ext() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: recognize AAC per SMPTE ST 381-4Ammon Riley2023-05-112-0/+7
| | | | | | | | | This patch simply recognizes the AAC audio track during decode -- it does not add functionality to encode AAC in MXF. Signed-off-by: Ammon Riley <ammon.riley@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/tests/imf: add invalid resource testPierre-Anthony Lemieux2023-05-111-0/+65
|
* avformat/imf: fix invalid resource handlingPierre-Anthony Lemieux2023-05-111-8/+6
|
* lavf/demux: export codec-level framerate in avformat_find_stream_info()Anton Khirnov2023-05-071-0/+1
|
* avformat/hls: fail on probing non hls/m3u8 file extensionsMichael Niedermayer2023-05-061-1/+8
| | | | | | | | | Its unexpected that a .avi or other "standard" file turns into a playlist. The goal of this patch is to avoid this unexpected behavior and possible privacy or security differences. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/av1dec: stop setting codec context framerateAnton Khirnov2023-05-051-1/+1
| | | | Demuxers are not supposed to do this.
* lavf/av1dec: mark as notimestampsAnton Khirnov2023-05-051-2/+2
|
* lavf/rawdec: stop setting codec context framerateAnton Khirnov2023-05-051-1/+0
| | | | Demuxers are not supposed to do this.
* lavf/demux: use avg_frame_rate for packet durations for notimestamps formatsAnton Khirnov2023-05-051-0/+5
| | | | | avg_frame_rate, if set, should be more reliable than stream timebase in this case.
* lavf/dv: use a more granular timebase for audioAnton Khirnov2023-05-021-3/+24
| | | | | | | | | | | | | One that is fine enough to represent all DV audio sample rates. Audio packet durations are now sample-accurate. This largely undoes commit 76fbb0052df471075858c1cb82b04c8be7adba8d. To avoid breaking the issue fixed by that commit, resync audio timestamps against video if they get more than one frame apart. The sample from issue #8762 still works correctly after this commit. Slightly changes the results of the lavf-dv seektest, due to the audio timebase being more granular.
* lavf/dv: shorten code by using a local variableAnton Khirnov2023-05-021-4/+7
|
* lavf/dv: do not set video timebase more than onceAnton Khirnov2023-05-023-16/+44
| | | | | | | | | | | | | Current code will call avpriv_set_pts_info() for each video frame, possibly setting a different timebase if the stream framerate changes. This violates API conventions, as the timebase is supposed to stay constant after stream creation. Change the demuxer to set a single timebase that is fine enough to handle all supported DV framerates. The seek tests change slightly because the new timebase is more granular.
* lavf/dauddec: set timebase to 1/samplerateAnton Khirnov2023-04-281-0/+4
| | | | | Prevents lavf from generating inexact timestamps with the default timebase of 1/90000.
* avformat/adtsenc: do not pass NULL to av_log()Paul B Mahol2023-04-271-3/+3
|
* mov: Do not blindly disable advanced edit lists if use_mfra_for is setDerek Buitenhuis2023-04-251-5/+1
| | | | | | | | | | This was a bug/mistake in dae3679a9bfa421829ef9049ae2167089a2fdef7. use_mfra_for by defintion only has an effect on fragmented MP4 files, making the check not only redundant, but also broken if a user used the option globally (i.e. set on non-fragmented MP4s). Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* tests: do not override movflags defaultsMarton Balint2023-04-241-27/+27
| | | | | | It does not matter if the default is 0, but still it is cleaner that way. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/smoothstreamingenc: do not override movflag defaultsMarton Balint2023-04-241-1/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/movenc: factorize determining mdhd/mvhd/tkhd versionMarton Balint2023-04-241-9/+12
| | | | | | | Also make duration check for mvhd more consistent with the others, write version 1 of mvhd if duration is at least INT32_MAX instead of UINT32_MAX. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mov: restrict unix timestamp hack to version 0 mdhd/mvhdMarton Balint2023-04-241-2/+5
| | | | | | | | | Commit 23eeffcd48a15e73fb2649b712870b6d101c5471 added a hack to support invalid files where the creation date was encoded as a classic unix timestamp. Let's reduce the scope of the hack by only applying it to version 0 mdhd/mvhd atoms. Also warn the user of such possibly broken files. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mov: factorize reading creation time metadataMarton Balint2023-04-241-20/+12
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/movenc: fixed fmp4 packets containing incorrect flags after transcodingWang Yaqiang2023-04-241-2/+2
| | | | | | | | | | | | When write multi-trun box, the MOV_TRUN_FIRST_SAMPLE_FLAGS flag need judge by first param, not 0. If the original video contains consecutive I frames, this will cause the packets of fmp4 have error sample_flags , and then incorrect keyframes were generated, and then error packet will be seeked. Signed-off-by: Wang Yaqiang <wangyaqiang03@kuaishou.com> Signed-off-by: Steven Liu <liuqi05@chinaffmpeg.org>
* avformat: add PDV demuxerPaul B Mahol2023-04-204-2/+177
|
* yuv4mpegenc: add bitdepth multiplier after rounding width.Ronald S. Bultje2023-04-191-1/+2
| | | | Fixes output of HBD odd-width chroma.
* avformat/concatf: check if any nodes were allocatedJames Almer2023-04-141-0/+2
| | | | | | Fixes ticket #10304 Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flvenc: avoid an extra allocateZhao Zhili2023-04-151-17/+13
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/flvenc: use local variable to shorten codeZhao Zhili2023-04-151-4/+4
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* lavf/rawdec: mark raw demuxers as having no timestampsAnton Khirnov2023-04-131-1/+1
| | | | | | Changes the result of the h264_redundant_pps-mov test, where the output timebase is now 1001/24000 instead of 1/24. This is more correct, as the source file actually is 23.98fps.
* lavf/demux: treat streams with AVSTREAM_PARSE_FULL_RAW as having timestampsAnton Khirnov2023-04-131-1/+1
| | | | | | | In this case the timestamps are set by the parser. Cf. a6b3471c44fd981d3b33ea9050f78a0bc9494c5e Required by the following commit.
* lavf/rawdec: set avg_frame_rateAnton Khirnov2023-04-131-0/+1
| | | | | | | | | | | | Timestamps in two FATE H.264 conformance tests now start at 1 instead of 0, which also happens in some other H.264 tests before this commit and so is not a big issue. Conversely, timestamps in some HEVC conformance tests start from a smaller value now. Ideally this should be addressed later in a more general way. h264-conformance-frext-frext2_panasonic_b no longer requires -vsync passthrough.
* avformat/matroskaenc: fix memory leak in fail codepathJames Almer2023-04-101-1/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: also export non-HDR10+ ITU-T T.35 payloads as ↵James Almer2023-04-101-8/+10
| | | | | | | | | BlockAdditional side data Partially reverts a change from 88de01d878167cbff9af32c0b7366e0aae3db2bd, and 2133cadfcf9a613cf2c0060f9896bba49dabfba4. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flvenc: use extract_extradata bsf when necessaryZhao Zhili2023-04-091-4/+6
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/matroskadec: also validate the mapping when BlockAddIDType is 0James Almer2023-04-081-2/+4
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: support writing Dynamic HDR10+ packet side dataJames Almer2023-04-081-13/+66
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: remove itu_t_t35 flag from MatroskaTrackJames Almer2023-04-081-5/+1
| | | | | | It's no longer needed after 88de01d878. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: validate MaxBlockAdditionID in the presence of ↵James Almer2023-04-071-0/+21
| | | | | | | | | | BlockAdditions The Matroska spec requires it to be equal to the highest BlockAddID value in a BlockAdditions, but being purely an informative element, only abort if strict compliance is requested, as demuxing is otherwise unaffected. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: reindent after the previous commitJames Almer2023-04-071-6/+6
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: parse all BlockAdditionMapping elements and export the ↵James Almer2023-04-071-13/+44
| | | | | | correct value as BlockAdditional side data Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mxfenc: reject unsupported ffv1 versionsJerome Martinez2023-04-061-0/+4
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: treat Random Index Pack as end of fileMarton Balint2023-04-061-1/+4
| | | | | | | | | RIP, if exists is the last KLV item in the MXF files therefore we can stop parsing the file if it is encountered. This allows us to support files created by broken muxers such as OpenCube MXFTk Advanced 2.8.0.0.1. which dumps some extra garbage after the RIP. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/matroskaenc: write a MaxBlockAdditionID elementJames Almer2023-04-051-4/+31
| | | | | | A non zero value is mandatory for Matroska if the track has blocks with BlockAdditions. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroska: add a few more Block Addition ID Type enum valuesJames Almer2023-04-053-6/+10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: export Dynamic HDR10+ packet side dataJames Almer2023-04-052-7/+76
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: set the default value for BlockAddIDTypeJames Almer2023-04-052-1/+5
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: support parsing more than one BlockMore elementJames Almer2023-04-051-21/+41
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/mux: clarify log messages when choosing oformat failsAnton Khirnov2023-04-041-3/+5
| | | | | | | | | Current log messages talk about 'suitable' output formats. This is confusing, because it suggests that some formats are suitable, while others are not, which is not the case. Also, suggest possible user actions when format cannot be guessed from a filename.