summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/mux: return a pointer to the packet in ff_interleaved_peek()James Almer2021-02-13
| | | | | | | And make it const, so the caller doesn't attempt to change it. ff_get_muxer_ts_offset() should be used to get the muxer timestamp offset. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mux: add ff_get_muxer_ts_offset()James Almer2021-02-13
| | | | | | Will be useful in the next patch Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: force lowres to 0 in avformat_find_stream_info()James Almer2021-02-13
| | | | | | Instead of applying it and then restoring the original codecpar dimensions. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/electronicarts: Clear partial_packet on errorMichael Niedermayer2021-02-12
| | | | | | | | | Fixes: Infinite loop Fixes: 30165/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-6224642371092480 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/r3d: Check samples before computing durationMichael Niedermayer2021-02-12
| | | | | | | | | Fixes: signed integer overflow: -4611686024827895807 + -4611686016279904256 cannot be represented in type 'long' Fixes: 30161/clusterfuzz-testcase-minimized-ffmpeg_dem_R3D_fuzzer-5694406713802752 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/wavdec: Consider AV_INPUT_BUFFER_PADDING_SIZE in set_spdif()Michael Niedermayer2021-02-10
| | | | | | | | | The buffer is read by using the bit reader Fixes: out of array read Fixes: 27539/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-5650565572591616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: Check remaining space in debug av_log() loopMichael Niedermayer2021-02-10
| | | | | | | | | Fixes: Timeout (long -> 2 ms) Fixes: 26709/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5665833403285504 Fixes: 27522/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-6321071221112832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvdec: Treat high ts byte as unsignedMichael Niedermayer2021-02-10
| | | | | | | Fixes: left shift of 255 by 24 places cannot be represented in type 'int' Fixes: 27516/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5152854660349952 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Ignore tags with invalid size during probingMichael Niedermayer2021-02-10
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Factor offset advancement out in probingMichael Niedermayer2021-02-10
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: simplify size code in probing a bitMichael Niedermayer2021-02-10
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Support size = 1 and size = 0 special cases in probingMichael Niedermayer2021-02-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: remove unnecessary HDR metadata log messagesJan Ekström2021-02-10
| | | | | | | | | | | | | | These made sense before 3ebf449766d4b69a7774c4990fb24fe71c848a3e when the creation of these boxes was specifically requested by the user, but now they have become unnecessary as they are just like many other boxes: If the input has the information required, they are written, otherwise they are not. They were moved to verbose verbosity level (which happens to be the last level still relatively usable), and now appear either once (normal MP4 muxing), or thrice (with the faststart flag set) in any normal MP4 usage, without giving much useful information. Thus, remove them in their current form.
* avformat/samidec: Sanity check ptsMichael Niedermayer2021-02-10
| | | | | | | | Fixes: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'long' Fixes: 29743/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-5499256859394048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avidec: Use 64bit in get_duration()Michael Niedermayer2021-02-10
| | | | | | | | Fixes: signed integer overflow: 2147483424 + 8224 cannot be represented in type 'int' Fixes: 29619/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5191424373030912 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Check for duplicate st3dMichael Niedermayer2021-02-10
| | | | | | | | Fixes: memleak Fixes: 29585/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6594188688490496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mvdec: Check for EOF in read_index()Michael Niedermayer2021-02-10
| | | | | | | | Fixes: Timeout Fixes: 29550/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5094307193290752 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: Check the return from avio_get_str()Michael Niedermayer2021-02-10
| | | | | | | | Fixes: out of array access Fixes: 29446/clusterfuzz-testcase-minimized-ffmpeg_dem_AAC_fuzzer-5096222622875648 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/fitsenc: write DATAMIN/DATAMAX to encoded outputPaul B Mahol2021-02-10
| | | | | | There is no point in doing normalization when such files are decoded. Update fate test with new results.
* avformat/mov: factor size out of probe codeMichael Niedermayer2021-02-09
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/wtvdec: Check len in parse_chunks() to avoid overflowMichael Niedermayer2021-02-09
| | | | | | | | | Fixes: signed integer overflow: 2147483647 + 7 cannot be represented in type 'int' Fixes: 30084/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-6192261941559296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/wtvdec: Check for EOF before potentially reseting the eof stateMichael Niedermayer2021-02-09
| | | | | | | | Fixes: infinite loop Fixes: 28042/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-6311288967528448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/asfdec_f: Add an additional check for the extradata sizeMichael Niedermayer2021-02-09
| | | | | | | | | Fixes: OOM Fixes: 30066/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-6182309126602752 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/3dostr: Check sample_rateMichael Niedermayer2021-02-09
| | | | | | | | | Fixes: signed integer overflow: -1268324762623155200 * 8 cannot be represented in type 'long' Fixes: 30123/clusterfuzz-testcase-minimized-ffmpeg_dem_THREEDOSTR_fuzzer-6710765123928064 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/libsrt: fix race condition with libsrt_network_wait_fd and epollMarton Balint2021-02-07
| | | | | | | | | | | | | | | The way SRT's async / epoll-based IO works is that the event status is stored in the epoll containers. That is, if an event occurs on an SRT socket, and that SRT socket isn't part of any epoll container, then that event is lost. If we later add that socket to an epoll container, we still won't receive the event even if it wasn't serviced. Therefore we create the epoll and put the fd into it right after the connection is established. See http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2021-January/275334.html Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/libsrt: fix or simplify some function return valuesMarton Balint2021-02-07
| | | | | | | Sometimes there was a confusion between srt_*() function return values and libavformat-style return values. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/libsrt: close listen fd immediately after acceptMarton Balint2021-02-07
| | | | | | There is no reason to keep it open. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/img2dec: improve xbm probingPaul B Mahol2021-02-05
|
* avformat/cdxl: add back options to override sample and frame ratePaul B Mahol2021-02-05
| | | | | It make sense to allow to control speed of playback when no infomation is provided.
* avformat: add xbm_pipe demuxerPaul B Mahol2021-02-05
|
* avformat/mxfenc: prefer to use the configured metadataLimin Wang2021-02-05
| | | | | | | | | | | | | | | | The metadata company_name, product_name, product_version from input file will be deleted to avoid overwriting information Please to test with below commands: ./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf and ./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy \ -metadata company_name="xxx" \ -metadata product_name="xxx" \ -metadata product_version="xxx" \ out.mxf Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mxf: add platform local tagLimin Wang2021-02-05
| | | | | | | | | | | Please check the string of platform with below command: ./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf ./ffmpeg -i out.mxf .... application_platform: Lavf (linux) Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mxfdec: set toolkit version metadataLimin Wang2021-02-05
| | | | | | | | | | | Please check the string of toolkit version with below command: ./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf ./ffmpeg -i out.mxf .... toolkit_version : 58.65.101.0.0 Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/cdxl: improve frame rate guessing for standard cdxlPaul B Mahol2021-02-05
| | | | | Use audio size and sample rate to get real frame rate. Also make seeking more robust.
* avformat/4xm: Make audio_frame_count 64bitMichael Niedermayer2021-02-04
| | | | | | | | Fixes: signed integer overflow: 2099257366 * 2 cannot be represented in type 'int' Fixes: 27486/clusterfuzz-testcase-minimized-ffmpeg_dem_FOURXM_fuzzer-5112179134824448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Use av_mul_q() to avoid integer overflowsMichael Niedermayer2021-02-04
| | | | | | | | Fixes: signed integer overflow: 538976288 * 538976288 cannot be represented in type 'int' Fixes: 27473/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5758978289827840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: add binka demuxerPaul B Mahol2021-02-04
|
* avformat/rmdec: Reorder operations to avoid overflowMichael Niedermayer2021-02-04
| | | | | | | | Fixes: signed integer overflow: -2147483648 - 14 cannot be represented in type 'int' Fixes: 27659/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-5697250168406016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mvdec: Sanity check SAMPLE_WIDTHMichael Niedermayer2021-02-04
| | | | | | | | | Fixes: signed integer overflow: 999999999 * 8 cannot be represented in type 'int' Fixes: 30048/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5864289917337600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/dashdec: Avoid segfault when URL template is unexpectedly missingsfan52021-02-04
| | | | | | This isn't supposed to happen, but unfinished support for non-templated manifests and lack of e.g. presentationTimeOffset handling can provoke such a situation even with well-formed input.
* avformat/dashdec: Fix missing NULL checksfan52021-02-04
|
* avformat/dashdec: rename variable name for more readableSteven Liu2021-02-04
| | | | | | | | Rename is_init_section_common_audio to is_init_section_common_subtitle for is_common_init_section_exist(c->subtitles, c->n_subtitles). Because it is checked to subtitles, not audio. Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
* avformat/dashdec: check init_section before use it.Steven Liu2021-02-04
| | | | | | | | | | | | | | because there have no Initialization in SegmentTemplate, so it will have no init_section for init segment file. but in the is_common_init_section_exist function it will be used for check to url, url_offset and size, so check init_section before use init_section. And fix code style in is_common_init_section_exist, make the code block short when it too long. fix ticket: 9062 Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
* avformat/cdxl: rework probe and fix sample rate and frame ratePaul B Mahol2021-02-04
|
* avformat/qtpalette: Use better headersAndreas Rheinhardt2021-02-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/rtsp: Fix build failure when RTP demuxers are disabledAndreas Rheinhardt2021-02-03
| | | | | | | | | | | | | | | rtsp.c uses a check of the form "if (CONFIG_RTSP_DEMUXER && ...) {}" with the intent to make the code compilable even though the part guarded by this check contains calls to functions that don't exist when the RTSP demuxer is disabled. Yet even then compilers still need a declaration of all the functions in the dead code block and error out if not (due to our usage of -Werror=implicit-function-declaration) and no such declaration exists for a static function in rtsp.c. Simply adding a declaration leads to a "used but never defined" warning, therefore this commit resorts to an #if. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/Makefile: Only compile qtpalette.c when neededAndreas Rheinhardt2021-02-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/qtpalette: Move default palette to their only userAndreas Rheinhardt2021-02-03
| | | | | | Namely qtpalette.c itself. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/cutils, dvenc: Move ff_brktimegm to its only userAndreas Rheinhardt2021-02-03
| | | | | | This also allows to completely remove cutils.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/cdxl: add support for custom 24bit pal8 formatsPaul B Mahol2021-02-03
| | | | Also stop discarding half of audio samples and use planar pcm s8.