summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* Remove unnecessary avassert.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove unnecessary mem.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove obsolete version.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | These have mostly been added because of FF_API_*; yet when these were removed, removing the header has been forgotten. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include channel_layout.h directly wherever used. 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/gifdec: log loop countGyan Doshi2021-07-20
|
* avformat/argo_brp: use bits_per_coded_sample instead of bits_per_raw_sampleZane van Iperen2021-07-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/pp_bnk: don't set bits_per_raw_sampleZane van Iperen2021-07-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/kvag: don't set bits_per_raw_sampleZane van Iperen2021-07-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/apm: don't set bits_per_raw_sampleZane van Iperen2021-07-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/alp: don't set bits_per_raw_sampleZane van Iperen2021-07-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_asf: don't set bits_per_raw_sampleZane van Iperen2021-07-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_cvg: don't set bits_per_raw_sampleZane van Iperen2021-07-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* Avoid calling functions repeatedly via FFMINAndreas Rheinhardt2021-07-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/subtitles: Deduplicate subtitles' read_(packet|seek|close)Andreas Rheinhardt2021-07-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: remove AVStreamInternal.orig_codec_idJames Almer2021-07-17
| | | | | | | It's a write only field. Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: do not ignore errors in mov_metadata_hmmt()Michael Niedermayer2021-07-17
| | | | | | | | Fixes: Timeout Fixes: 35637/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6311060272447488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: Check size for shrinkingMichael Niedermayer2021-07-17
| | | | | | | | | av_shrink_packet() takes int size, so size must fit in int Fixes: out of array access Fixes: 35607/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4875541323841536 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mov: Don't export unknown/unhandled metadata types as if they were UTF8Martin Storsjö2021-07-15
| | | | | | | They can be other incompatible text encodings (such as UTF-16), or even binary data. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Pick up "com.apple.quicktime.artwork" as cover artMartin Storsjö2021-07-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Fix double write of DASH manifest in streaming modeKevin LaFlamme2021-07-14
| | | | | | | When streaming mode is enabled, the DASH manifest is written on the first packet for the segment so that the segment can be advertised immediately to clients. It was also still writing the manifest at the end of the segment leading to two duplicate writes.
* libavformat/rtsp.c: Reply to GET_PARAMETER requestsHayden Myers2021-07-12
| | | | | | | | | | | | | | Some encoders send GET_PARAMETER requests as a keep-alive mechanism. If the client doesn't reply with an OK message, the encoder will close the session. This was encountered with the impath i5110 encoder, when the RTSP Keep-Alive checkbox is enabled under streaming settings. Alternatively one may set the X-No-Keepalive: 1 header, but this is more of a workaround. It's better practice to respond to an encoder's keep-alive request, than disable the mechanism which may be manufacturer specific. Signed-off-by: Hayden Myers <hmyers@skylinenet.net> Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/oggparsevorbis: Update end_trimming for the last packetGuangyu Sun2021-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without end_trimming, the last packet will contain unexpected samples used for padding. This commit partially fixes #6367 when the audio length is long enough. dd if=/dev/zero of=./silence.raw count=20 bs=500 oggenc --raw silence.raw --output=silence.ogg oggdec --raw --output silence.oggdec.raw silence.ogg ffmpeg -codec:a libvorbis -i silence.ogg -f s16le -codec:a pcm_s16le silence.libvorbis.ffmpeg.raw ffmpeg -i silence.ogg -f s16le -codec:a pcm_s16le silence.native.ffmpeg.raw ls -l *.raw The original test case in #6367 is still not fixed due to a remaining issue. The remaining issue is that ogg_stream->private is not kept during ogg_save()/ogg_restore(). Field final_duration in the private data is important to calculate end_trimming. Some common operations such as avformat_open_input() and avformat_find_stream_info() before reading packet will trigger ogg_save() and ogg_restore(). Luckily, final_duration will not get updated until the last ogg page. The save/restore mentioned above will not change final_duration most of the time. But if the audio length is short, those reads may be performed on the last ogg page, causing trouble keeping the correct value of final_duration. We probably need a more complicated patch to address this issue. Signed-off-by: Guangyu Sun <gsun@roblox.com>
* cafenc: fill in avg. packet size later if unknownRoman Beranek2021-07-12
| | | | | | | | | | | | | | | | | Frame size of Opus stream was previously presumed here to be 960 samples (20ms), however sizes of 120, 240, 480, 1920, and 2880 are also allowed. It can also alter on a per-packet basis and even multiple frames may be present in a single packet according to the specification, for the sake of simplicity however, let us assume that this doesn't occur. Because the mFramesPerPacket field, representing the number of samples per packet in the ffmpeg terminilogy, is the key factor in calculating packet durations and all that follows from that (index, bitrate, ...), it is crucial to get right. Therefore, if the packet size is not available ahead of time (as it is in the case of Opus), calculate an average from the stream duration once we know how many packets there are and update the filed in the header.
* avformat/udp: fix check for pthread_cond_wait return valueZhao Zhili2021-07-10
| | | | | | | | POSIX errno is positive. We have strict_pthread_cond_wait to handle error code during development. Signed-off-by: zhilizhao <zhilizhao@tencent.com> Reviewed-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/img2dec: Fix typo in AVClass nameAndreas Rheinhardt2021-07-08
| | | | | Found-by: Gyan Doshi <ffmpeg@gyani.pro> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/v210: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/segment: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rawdec: Deduplicate AVClasses based upon ff_rawvideo_optionsAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rawdec: Deduplicate AVClasses based upon ff_raw_optionsAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/pcmdec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/oggenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mpegenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/img2dec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/img2dec: Make ff_img2pipe_options staticAndreas Rheinhardt2021-07-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hashenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/g726: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flvdec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flacdec, takdec: Use FFRawDemuxerContext directlyAndreas Rheinhardt2021-07-08
| | | | | | | | | | | | | The beginning of the private contexts of both the FLAC and the TAK demuxer currently mimick FFRawDemuxerContext: A pointer to an AVClass followed by the AVOpt-enabled field raw_packet_size. Said field is only used by the demuxers' read_packet functions via ff_raw_read_partial_packet(), which treats the private context as an FFRaawDemuxerContext. Yet this is fragile, so better include a FFRawDemuxerContext struct at the beginning of said demuxers' private contexts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/codec2: Remove unused AVClass with wrong categoryAndreas Rheinhardt2021-07-08
| | | | | | | The codec2 muxer has no options and so it needs no AVClass; and it certainly needs no AVClass of category AV_CLASS_CATEGORY_DEMUXER. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/asfenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aptxdec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/Makefile: Remove rawdec dependency from aptx, codec2 demuxersAndreas Rheinhardt2021-07-08
| | | | | | | These demuxers don't need anything from rawdec; they furthermore only used rawdec.h to include opt.h. Both of this has been fixed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/Makefile: Add missing rawdec dependency for IPU demuxerAndreas Rheinhardt2021-07-08
| | | | | | Needed for ff_raw_read_partial_packet and ff_raw_options. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/xmv: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-08
| | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/webvttdec: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-08
| | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/wc3movie: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-08
| | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/vplayerdec: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-08
| | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>