summaryrefslogtreecommitdiff
path: root/libavformat/concatdec.c
Commit message (Collapse)AuthorAge
* lavf/concatdec: add stream_extradata directiveNicolas George2021-09-16
|
* lavf/concat: add support for chaptersNicolas George2021-09-16
|
* lavf/concatdec: add stream_codec directiveNicolas George2021-09-16
|
* lavf/concatdec: support stream metadataNicolas George2021-09-16
|
* lavf/concat: deprecate file_packet_metadataNicolas George2021-09-16
|
* lavf/concat: add file_packet_meta directiveNicolas George2021-09-16
| | | | Same as file_packet_metadata without the double parsing.
* lavf/concat: refactor parsingNicolas George2021-09-16
|
* lavf/concatdec: support per-file optionsNicolas George2021-08-22
|
* libavformat/concatdec: remove support for unsafe=-1Nicolas George2021-08-22
| | | | | It only makes sense as the default value, but it is not the default since 689211d5727231c3fe92762d224dbadebdbf4e30.
* avformat/internal: Move ff_read_line_to_bprint_overwrite to avio_internal.hAndreas Rheinhardt2021-07-29
| | | | | | | | | | | | | It only uses an AVIOContext and an AVBPrint. When doing so, it turned out that several non-users of ff_read_line_to_bprint_overwrite() and ff_bprint_to_codecpar_extradata() relied on libavformat/internal.h to include bprint.h or avstring.h for them. In order to avoid a repeat of this and in order to reduce unnecessary dependencies, a forward declaration of struct AVBPrint is used instead of including bprint.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove unnecessary avassert.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including bsf.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include bsf.h directly wherever it is used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/concatdec: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-07
| | | | | | | | | | by setting the FF_FMT_INIT_CLEANUP flag. (Btw: concat_read_close() is not idempotent (it frees cat->files, but doesn't reset cat->nb_files), so this demuxer was incompatible with simply calling read_close generically upon read_header failure.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: move AVStream.{first,cur}_dts to AVStreamInternalJames Almer2021-06-09
| | | | | | They are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt2021-04-27
| | | | | | | Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/packet: Also change av_packet_pack/unpack_dictionary to size_tAndreas Rheinhardt2021-03-19
| | | | | | | | | These are auxiliary side-data functions, so they should have been switched to size_t in d79e0fe65c51491f9bf8a470bbe36fb09f3e1280, but this has been forgotten. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/concatdec: use av_strstart()Michael Niedermayer2020-11-03
| | | | | | | | | | Fixes: out array read Fixes: 26610/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5631838049271808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/concatdec: Avoid duplicating buffer when adding side-dataAndreas Rheinhardt2020-05-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat: Remove unnecessary av_packet_unref()Andreas Rheinhardt2020-02-10
| | | | | | | | | Since bae8844e the packet will always be unreferenced when a demuxer returns an error, so that a lot of calls to av_packet_unref() in lots of demuxers are now redundant and can be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: Don't free old extradata before ff_alloc/get_extradataAndreas Rheinhardt2019-12-12
| | | | | | | | These functions already free it themselves before they allocate the new extradata. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* avformat/concatdec: always re-calculate start time and durationMarton Balint2019-01-22
| | | | | | | | | | | | | | | | | | | | | This allows the underlying files to change their duration on subsequent avformat context opens. An example use case where this matters: ffconcat version 1.0 file dummy.mxf file dummy.mxf ffmpeg -re -stream_loop -1 -i dummy.ffconcat -f sdl2 none The user can seamlessly change the input by atomically replacing dummy.mxf. v2: Set ConcatFile duration in read_header for all segments with known durations because from now on we always recalculate the start time in open_file, and an instant seek could have caused unset ConcatFile durations. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/concatdec: fix cur_dts based duration calculation with nonzero ↵Marton Balint2019-01-22
| | | | | | stream start_time Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/concatdec: factorize the duration calculating functionMarton Balint2019-01-22
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/concatdec: always allow seeking to startMarton Balint2018-12-30
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/concatdec: only set output stream index before returning packetMarton Balint2018-04-02
| | | | | | | Fixes ticket #6434. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/concatdec: add support for very long line sizesMarton Balint2018-02-24
| | | | | | Fixes ticket #6761. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/concatdec: properly init streams timestamp parameters.Nicolas George2017-12-31
| | | | | | pts_wrap_bits defaults to 33 (like MPEG), that causes valid timestamps to be unwrapped and become invalid. Inspired by a patch by Wu Zhiqiang <mymoeyard@gmail.com>.
* avformat/concatdec: add fallback for calculating file durationJustin Ruggles2017-08-31
| | | | | | | | | If a file does not have a known duration, this leads to the timestamps starting over for the next file, causing non-monotonic timestamps. To prevent this, track the duration during demuxing and use it to determine the current file duration before opening the next file. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* concatdec: Do not pass NULL to memcmpDerek Buitenhuis2017-07-06
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavf/concatdec: do not transfer custom IO flagClément Bœsch2017-05-22
| | | | | | | If the source is using a custom IO, setting this flag causes heavy leaks since the segments will not have their avio context closed. Regression since f5da453b068f55d335ca403d2e2b4dd2ac3d4331.
* avformat/concatdec: port to the new bitstream filter APIJames Almer2017-05-03
| | | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/concatdec: fix the h264 annexb extradata checkJames Almer2017-04-25
| | | | The start code can be either in the first three or four bytes.
* concatdec: pass AVFormatContext flags to sub demuxerwm42017-03-09
|
* avformat/concatdec: don't call open_file when seek position within a fileraymondzheng1412@gmail.com2016-09-28
|
* lavf/concatdec: clear extradata when inserting h264_mp4toannexb bsf.Nicolas George2016-04-26
| | | | Fix remuxing H.264-in-MP4 to Matroska, possibly others.
* lavf/concatdec: remove unrelated change during codecpar merge.Nicolas George2016-04-26
| | | | | | | Clearing the extradata is not related to the codecpar change, and it breaks if auto_convert is disabled. Fix trac ticket #5461.
* avformat/concatdec: Use correct stream count on closeTimo Rothenpieler2016-04-11
|
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
| | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/concatdec: set safe mode to enabled instead of autoMichael Niedermayer2016-03-10
| | | | | | | | | This is safer, as a selected demuxer could still mean that it was auto-detected by a user application Reviewed-previously-by: Nicolas George <george@nsup.org> Reviewed-previously-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Add a protocol blacklisting APIDerek Buitenhuis2016-03-04
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavf/concatdec: do not access packet if av_read_frame returned errorMarton Balint2016-01-10
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
|
* concatdec: add option for adding segment start time and duration metadataMarton Balint2015-11-25
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: simplify duration calculation in open_next_fileMarton Balint2015-11-25
| | | | | | | | If duration is still AV_NOPTS_VALUE when opening the next file, we can assume that outpoint is not set. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: calculate duration early if outpoint is knownMarton Balint2015-11-25
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-27
|
* concatdec: fix file_start_time calculation regressionMarton Balint2015-10-17
| | | | | | | | Fixes ticket #4924. Found-by: Jaroslav Šnajdr <jsnajdr@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>