Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-08Bump minor versions to separate 4.3 from masterMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."Michael Niedermayer
This causes regressions in end to end timestamps with mp3s and ffmpeg. The revert is to avoid this regression in the 4.3 release See: [FFmpeg-devel] [PATCH] Don't adjust start time for MP3 files; packets are not adjusted. This reverts commit 460132c9980f8a1f501a1f69477bca49e1641233.
2020-06-08avformat/4xm: Cleanup on GET_LIST_HEADER() failureMichael Niedermayer
Fixes: memleak Fixes: 23142/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5932860820422656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-07avformat/mlvdec: fail reading a packet with 0 streamsMichael Niedermayer
Fixes: NULL pointer dereference Fixes: 22604/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5667739074297856.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-07avformat/thp: Check compcountMichael Niedermayer
Fixes: out of array access Fixes: 22520/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5100297658826752 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-07avformat/oggdec: Do not hardcode arbitrary and sometimes unavailable sizeMichael Niedermayer
Fixes: regression since e983197cbc93420b67aa7e811be47d7278c2c8a2 Fixes: out of array read Fixes: 22185/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5662069073641472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-07avformat/oggdec: Initialize return value from ogg_read_page() and check it ↵Michael Niedermayer
everywhere Fixes regression since 9ad47762c17d2c6d06595aa17b88112baa91b72c Fixes: out of array access Fixes: 22172/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5658535590625280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06avformat: Fix overflow in compute_pkt_fields().Dale Curtis
Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06avformat/rawdec: fix identifier namesMichael Niedermayer
Fixes: out of array access Fixes: 22686/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5121369624018944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-04avformat/utils: Find a fallback probe decoder that will also match a forced ↵Samuel Foss
decoder's codec. Prevent codecpar->codec_id from getting out of sync with the codec instantiated for probing. Signed-off-by: Samuel Foss <sfoss@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-04lavf/tee: pass options to protocol.Nicolas George
Fix trac ticket #8705.
2020-06-02avformat/prompeg: av_dict_set() -> av_dict_set_int()Limin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-02avformat/rtpproto: av_dict_set() -> av_dict_set_int()Limin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-02avformat/rtspdec: av_dict_set() -> av_dict_set_int()Limin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-01avformat/dashenc: use AVStream timebase when computing missing bitratePrzemysław Sobala
2020-05-31avformat/mpegtsenc: set stream_id correctly based on KLV profile selectedBrad Hards
Previously we always set STREAM_TYPE_PRIVATE_DATA, and that remains the default value. Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-31avformat: add kvag muxerZane van Iperen
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-31avformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.Dale Curtis
Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-30avcodec: add PFM image decoderPaul B Mahol
2020-05-30lavf/utils: fix start_time/duration dump if it is AV_NOPTS_VALUEJun Zhao
e,g: the command: ffprobe -show_format -i fate-suite/aac/foo.aac -loglevel 99 will dump the trace message as follow when start_time is AV_NOPTS_VALUE [aac @ 0x55bf8e1f3dc0] stream 0: start_time: -326791809695.818 duration: 2.174 [aac @ 0x55bf8e1f3dc0] format: start_time: -9223372036854.775 duration: 2.174 bitrate=120 kb/s after this fix, will dump the start_time with "NOPTS". Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-05-29avformat/utils: Use av_sat_add64() when updating start_time by skip_samples.Dale Curtis
Avoids overflow from fuzzed skip_samples values. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-29Use av_sat_sub64() when updating pts by duration.Dale Curtis
Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-28avformat/oggdec: Avoid duplicating buffer when adding side-dataAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28avformat/img2dec: Avoid duplicating buffer when adding side-dataAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28avformat/concatdec: Avoid duplicating buffer when adding side-dataAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28avformat/flvdec: Avoid duplicating extradata when adding side-dataAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28avformat/hlsenc, hlsplaylist: CosmeticsAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28avformat/hlsenc: Avoid duplicating strings when parsingAndreas Rheinhardt
Up until now, the HLS muxer uses av_strtok() to split an input string controlling parameters of the VariantStreams and then duplicates parts of this string containing parameters such as the language or the name of the VariantStream. But these parts are proper zero-terminated strings of their own that are never modified lateron, so one can simply use the substring as-is without creating a copy. This commit implements this. The same also happened for the string controlling the closed caption groups. Furthermore, add const to indicate that the pointers to these substrings are not used to modify them and also to indicate that these strings are not allocated on their own. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28avformat/hlsenc: Don't unnecessarily duplicate baseurl stringAndreas Rheinhardt
Up until now, the HLS muxer duplicated a string for every VariantStream, although neither the original nor the copies are ever modified. So use the original directly and stop copying. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28avformat/hlsplaylist: Add const where appropriateAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28lavf/mpegtsenc: misc style fixesJun Zhao
commit 32aeba12755 missed coding style fix. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-05-27avformat/mpegts: use get_packet_size in mpegts_resync for determining ↵Marton Balint
raw_packet_size The old resync logic had some bugs, for example the packet size could stuck into 192 bytes, because pos47_full was not updated for every packet, and for unseekable inputs the resync logic simply skipped some 0x47 sync bytes, therefore the calculated distance between sync bytes was a multiple of 188 bytes. AVIO only buffers a single packet (for UDP/mpegts, that usually means 1316 bytes), so for every ten consecutive 188-byte MPEGTS packets there was always a seek failure, and that caused the old code to not find the 188 byte pattern across 10 consecutive packets. This patch changes the custom logic to the one which is used when probing to determine the packet size. This was already proposed as a FIXME a long time ago...
2020-05-27avformat: fix apm makefile dependencyZane van Iperen
Uses ff_get_wav_header() in riffdec.c Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-27avformat/mpegtsenc: cosmeticLimin Wang
Merge the short lines after the last commit Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-27avformat/mpegtsenc: simplify code by using OFFSET() and ENC macrosLimin Wang
Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-27lavf/mp3dec: don't adjust start time; packets are not adjusted.Dale Curtis
7546ac2fee4 made it so that the start_time for mp3 files is adjusted for skip_samples. However, this appears incorrect because subsequent packet timestamps are not adjusted and skip_samples are applied by deleting data from a packet without changing the timestamp. E.g., we are told the start_time is ~25ms and we get a packet with a timestamp of 0 that has had the skip_samples discarded from it. As such rendering engines may incorrectly discard everything prior to the 25ms thinking that is where playback should officially start. Since the samples were deleted without adjusting timestamps though, the true start_time is still 0. Other formats like MP4 with edit lists will adjust both the start time and the timestamps of subsequent packets to avoid this issue. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-05-26avformat/matroskadec: Beautify matroska_parse_laces()Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-26avformat/oggparsevorbis: Error out on double init of vpMichael Niedermayer
Fixes: memleak Fixes: 19949/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5743636058210304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-25avformat: Replace ffurl_close() by ffurl_closep() where appropriateAndreas Rheinhardt
It avoids leaving dangling pointers behind in memory. Also remove redundant checks for whether the URLContext to be closed is already NULL. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-25libavformat/flacdec: Workaround for truncated metadata picture sizeMattias Wadman
Some flac muxers write truncated metadata picture size if the picture data do not fit in 24 bits. Detect this by truncting the size found inside the picture block and if it matches the block size use it and read rest of picture data. This workaround is only for flac files and not ogg files with flac METADATA_BLOCK_PICTURE comments and it can be disabled with strict level above normal. Currently there is a 500MB limit on truncate size to protect from large memory allocations. The truncation bug in lavf flacenc was fixed in e447a4d112bcfee10126c54eb4481fa8712957c8 but based on existing broken files other unknown flac muxers seems to truncate also. Before the fix a broken flac file for reproduction could be generated with: ffmpeg -f lavfi -i sine -f lavfi -i color=red:size=2400x2400 -map 0:0 -map 1:0 -c:v:0 bmp -disposition:1 attached_pic -t 1 test.flac Fixes ticket 6333 Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-05-25fate: add tests for h264 and vp9 video enc parameters exportAnton Khirnov
2020-05-25avformat/id3v2: Remove unnecessary indirectionAndreas Rheinhardt
ff_id3v2_parse_apic/chapters/priv/priv_dict all had a parameter extra_meta of type ID3v2ExtraMeta ** as if the functions wanted to make *extra_meta point to something else. But they don't, so just use an ID3v2ExtraMeta *. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-25avformat/id3v2: Avoid allocations for ID3v2ExtraMetaAndreas Rheinhardt
Up until now, the ID3v2ExtraMeta structure (which is used when parsing ID3v2 tags containing attached pictures, chapters etc.) contained a pointer to separately allocated data that depended on the type of the tag. Yet the difference of the sizes of the largest and the smallest of these structures is fairly small, so that it is better to simply include a union of all the possible types of tag-dependent structures in ID3v2ExtraMeta. This commit implements this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-25avformat/aiffenc: Don't forget chaptersAndreas Rheinhardt
If the write_id3v2 option is set, the aiff muxer would write id3v2 tags if there is global metadata or if there are attached pics to write. Chapters are ignored in this check that precedes writing id3v2 tags. Yet 47ac344970f1d6ef149c4b8a883b68cdb15112c2 added support for writing chapters as id3v2 tags, so one should check for the existence of chapters, too; otherwise the chapters would only be written in case there is global metadata or an attached pic. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-23oggdec: remove the oggparsedaala subdemuxerLynne
The Xiph foundation never standardized either Daala nor its mapping in Ogg, and all files that were created are undecodable without knowledge of the git hash.
2020-05-23avformat/webm_chunk: Open AVIOContext before initializing sub-muxerAndreas Rheinhardt
The description of AVOutputFormat.init contains the statement that "this method must not write output". Due to this, the webm_chunk muxer defers opening the AVIOContext for the child muxer until avformat_write_header(), i.e. there is no AVIOContext when the sub-muxer's avformat_init_output() is called. But this violates the documentation of said function which requires the AVFormatContext to have an already opened AVIOContext. This commit fixes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-23avformat/matroskaenc: Forward errors from avpriv_split_xiph_headers()Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-23avformat/matroskadec: Use proper context for loggingAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-23avformat/segment: Propagate dispositionAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-23avformat/segment: Access AVStream more directlyAndreas Rheinhardt
by storing s->streams[i] in a pointer instead of constantly using s->streams[i]->... Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>