summaryrefslogtreecommitdiff
path: root/libavformat/concatdec.c
Commit message (Collapse)AuthorAge
* 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>
* concatdec: fix metadata memleak on errorMarton Balint2015-10-05
| | | | | | | Fixes Coverity CID 1323077. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/concatdec: Check file variable before dereferencingMichael Niedermayer2015-09-03
| | | | | | | | Fixes CID1322328 Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* concatdec: fix broken file_inpoint calculationMarton Balint2015-08-11
| | | | | | Should fix ticket #4765. Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: add support for injecting packet metadataMarton Balint2015-07-17
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: add support for specifying outpoint of filesMarton Balint2015-07-17
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: store eof condition in contextMarton Balint2015-07-17
| | | | | | | | This is needed later for outpoint support which may leave the last file in a not-eof state. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: add support for specifying inpoint of filesMarton Balint2015-07-17
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/concatdec: copy stream metadata when using concatVadim Belov2015-07-01
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/concatdec: Enable auto_convert by defaultMichael Niedermayer2015-05-29
| | | | | | | | Users have no means to find out from a failure how to make it work or is it preferred to check and print a warning for h264 concat without auto_convert ? Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/concatdec: avoid NULL dereference when failed to open file.Zhang Rui2015-01-29
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/concatdec: handle NOPTS start_time.Nicolas George2014-12-15
| | | | | | | Fix trac ticket #3598. Signed-off-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/concatdec: add timestamp logStefano Sabatini2014-11-19
| | | | Help debugging timestamp conversion issues.
* avformat: Add and use ff_copy_whitelists()Michael Niedermayer2014-10-24
| | | | | | | Fixes potential security issue in case of running out of memory Found-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/concatdec: Forward whitelists to the subdemuxers.Michael Niedermayer2014-10-23
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/concatdec: fix "warning: explicitly assigning a variable of type ↵Michael Niedermayer2014-09-10
| | | | | | | int to itself" Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/concatdec: implement automatic conversions.Nicolas George2014-04-29
|
* lavf/concatdec: reindent after last commit.Nicolas George2014-04-29
|