summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* avformat/musx: improve probingPaul B Mahol2020-09-03
|
* avformat/wavdec: add support for chaptersPaul B Mahol2020-09-01
| | | | Support parsing 'cue ' and 'adtl' chunks.
* avformat/wavdec: allow to change max size of single demuxed packetPaul B Mahol2020-09-01
| | | | | Can make demuxing much faster, expecially for files with huge number of channels.
* avformat/wavdec: add support for demuxing Broadcast Wave 64BitPaul B Mahol2020-09-01
|
* libavformat/dashenc: Reduce confusion in par error messageChris Miceli2020-08-31
| | | | | | | | | | In ticket #8754 there is discourse surrounding the error message which is printed upon a mismatched aspect ratio in derived encodings. This should make it clearer to the user as to the issues which they are experiencing. Reviewed-by: "Jeyapal, Karthick" <kjeyapal@akamai.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* adtsenc: Add ability to write MPEG2 IDMarvin Scholz2020-08-30
| | | | | Reviewed-by: Kieran Kunhya <kierank@obe.tv> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavformat/mxfenc: color_range should be inclusiveHarry Mallon2020-08-29
| | | | | | | | MXF CDCI color range was being set to (1<<sc->component_depth) - 1 for full range but it should be (1<<sc->component_depth) as 0 is a valid value. Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avformat/mxfdec: Read video range from CDCIEssenceDescriptorHarry Mallon2020-08-29
| | | | | | | * Capture black_ref, white_ref and color_range and recognise full and narrow range. Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avformat/mov: See if mfra makes up the difference for an incomplete sidx.Dale Curtis2020-08-28
| | | | | | | | | | | | | A few popular sites have started generating MP4 files which have a sidx plus an mfra. The sidx accounts for all size except the mfra, so the old code did not mark the fragment index as complete. Instead we can just check if there's an mfra and if its size makes up the difference we can mark the index as complete. Bug: https://crbug.com/1107130 Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/mpegtsenc: reindent the codeLimin Wang2020-08-26
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mpegtsenc: add registration descriptor for AC-3 and EAC3Limin Wang2020-08-26
| | | | | | | | | | Some DVB and ATSC captures are using the official MPEG2 registration descriptor in addition to using the correct stream type and the AC-3_audio_stream_descriptor/AC3_descriptor. So let's add it even if it is not strictly needed for DVB/ATSC. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* lavf/rtpdec_jpeg: Fix JFIF version.Carl Eugen Hoyos2020-08-25
| | | | See also b1931321
* lavf/mxfdec: Limit score for files with run-in.Carl Eugen Hoyos2020-08-25
| | | | | | | | Only return AVPROBE_SCORE_MAX if the header partition pack key is at the start of the file. Fixes ticket #8846. Reviewed-by: Tomas Härdin
* Set AVSTREAM_PARSE_HEADERS flag for AV1 MP4 streamsVikas Agrawal2020-08-24
| | | | | | | | | | It help initialize chroma format and other info properly Chroma format wasn't correct if I use below code: avformat_find_stream_info(fmtc, NULL); iVideoStream = av_find_best_stream(fmtc, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0); eChromaFormat = (AVPixelFormat)fmtc->streams[iVideoStream]->codecpar->format; Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegtsenc: support DVB 6A descriptor for AC-3Limin Wang2020-08-23
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* libavformat/ffmetadec.c: Fix Use-of-uninitialized-valueThierry Foucu2020-08-22
| | | | | | | Check the return value of sscanf as it can return -1(EOF), for example when the first char in the line is 0x00 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavformat/nut: Support SSA and ASS subtitleshax@riseup.net2020-08-22
| | | | | | | ffmpeg documentation says the NUT container supports SubStation Alpha This brings actual functionality in line with documentation. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: write the colr atom by defaultMichael Bradshaw2020-08-21
| | | | | | | | | | | | | | | | | The write_colr flag has been marked as experimental for over 5 years. It should be safe to enable its behavior by default as follows: - Write the colr atom by default for mp4/mov if any of the following: - The primaries/trc/matrix are all specified, OR - There is an ICC profile, OR - The user specified +write_colr - Keep the write_colr flag for situations where the user wants to write the colr atom even if the color info is unspecified (e.g., http://ffmpeg.org/pipermail/ffmpeg-devel/2020-March/259334.html) This fixes https://trac.ffmpeg.org/ticket/7961 Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
* avformat/libsrt: close listen fd in listener modeNicolas Sugino2020-08-20
| | | | | | | | | | | In listener mode the first fd is not closed when libsrt_close() is called because it is overwritten by the new accept fd. Added the listen_fd to the context to properly close it when libsrt_close() is called. Fixes trac ticket #8372. Signed-off-by: Nicolas Sugino <nsugino@3way.com.ar> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/siff: Reject audio packets without audio streamMichael Niedermayer2020-08-20
| | | | | | | | | Fixes: Assertion failure Fixes: 24612/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6600899842277376.fuzz 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>
* libavformat/r3d.c: Fix Use-of-uninitialized-value in filename.Thierry Foucu2020-08-20
| | | | | | | While reading the filename tag, it may return a EOF and we are still copying the file with uninitialized value. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpegts: only reset timestamps to NOPTS for DVB teletextJan Ekström2020-08-18
| | | | | | | | | | | While having the possibility of non-NOPTS values that can suddenly jump in time due to adjustments to match PCR is not nice for DVB subtitles, apparently the parser for this format bases its behavior on whether the packets' timestamps are NOPTS or not. Thus while we can adjust timestamps, we should exclude DVB subtitles from the timestamp unsetting logic. Fixes #8844
* avformat/mpeg: Check avio_read() return value in get_pts()Michael Niedermayer2020-08-18
| | | | | | | Found-by: Thierry Foucu <tfoucu@gmail.com> Fixes: Use-of-uninitialized-value Reviewed-by: Thierry Foucu <tfoucu@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mlvdec: Only store dimensions after having validated themAndreas Rheinhardt2020-08-18
| | | | | | | Otherwise it might happen that invalid dimensions are used when reading a video packet; this might lead to undefined overflow. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mlvdec: Don't leak open AVIOContexts on errorAndreas Rheinhardt2020-08-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mlvdec: Check for existence of AVIOContext before using itAndreas Rheinhardt2020-08-18
| | | | | | | | | | | The mlv demuxer supports input split into multiple files; if invalid data is encountered when parsing one of the subsequent files, that file is closed. But at this point some index entries belonging to this file might already have been added. In this case, the read_packet function might try to use the AVIOContext (which is NULL) to read data which will of course crash. This commit fixes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hls: Use av_init_pkt() directlyAndreas Rheinhardt2020-08-18
| | | | | | | | | and remove reset_packet(). The packet's data pointer is already zeroed, so the only thing that reset_packet() does that av_init_pkt() doesn't is redundant. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hls: Remove redundant resetting of AVPacketAndreas Rheinhardt2020-08-18
| | | | | | | av_read_frame() already returns blank packets on error. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hls: Fix memleak when url is emptyAndreas Rheinhardt2020-08-18
| | | | | | | Fixes Coverity ID 1465888. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/av1dec: don't update temporal_unit_size after it's no longer usedJames Almer2020-08-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: inline obu_read_data() and obu_prefetch() into obu_get_packet()James Almer2020-08-15
| | | | | | | They don't really help making the demuxer more readable. Reviewed-by: Guangxin Xu <oddstone@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: fix return value on some code pathsJames Almer2020-08-14
| | | | | | | | | | | If avio_read() returns a value of bytes read that's lower than the expected, return an error instead. And when there are zero bytes in the prefetch buffer, return 0 in order for the frame merge bsf to drain all potentially buffered packets. Missed by mistake when amending and committing 9a7bdb6d71. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: add missing preprocessor wrappers to annexb and obu demuxersJames Almer2020-08-14
| | | | | | Ensure the modules are compiled only if enabled. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: add low-overhead bitstream formatXu Guangxin2020-08-14
| | | | | | It's defined in Section 5.2, used by netflix. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/url: rewrite ff_make_absolute_url() using ff_url_decompose().Nicolas George2020-08-12
| | | | | | | | | | Also add and update some tests. Change the semantic a little, because for filesytem paths symlinks complicate things. See the comments in the code for detail. Fix trac tickets #8813 and 8814.
* lavf/url: add ff_url_decompose().Nicolas George2020-08-12
|
* avformat/mxfenc: Write color metadata to MXFHarry Mallon2020-08-12
| | | | | | | Writes color_primaries, color_trc and color_space to mxf headers. ULs are from https://registry.smpte-ra.org/ site. Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avformat/ty: Remove write-only array and variableAndreas Rheinhardt2020-08-11
| | | | | | | | | | | | | | | | Up until now, the TiVo demuxer parse an array of SEQ entries, yet it has never ever made any use of them. In fact, parse_master, the function parsing said table, only influenced the outside world in three ways: Via an excessive amount of error message in case a certain parameter is not what it expected; via an allocation (the aforementioned write-only array); and by setting a certain parameter (ty->cur_chunk_pos), but that parameter is always overwritten before it is used (it is overwritten in get_chunk() on success and if get_chunk() fails, the error is returned to the caller anyway). So remove the array and the function used to parse it. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/argo_asf: strip file extension from nameZane van Iperen2020-08-11
| | | | | | | Only when the user hasn't manually specified one. Matches the original files more closely. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_asf: add name optionZane van Iperen2020-08-11
| | | | | | Reviewed-by: Alexander Strasser <eclipse7@gmx.net> Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_asf: add version_major and version_minor optionsZane van Iperen2020-08-11
| | | | | | Reviewed-by: Alexander Strasser <eclipse7@gmx.net> Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_asf: don't check file versionZane van Iperen2020-08-11
| | | | | | | | | | | | | | | | It has no bearing on structure. Determined by looking at the ASF files from several Argonaut games: - FX Fighter, - Croc, - Croc 2, - The Emperor's New Groove, and - Disney's Aladdin in Nasira's Revenge The only versions that appear are 1.1, 1.2, and 2.1, and their structure is identical. Reviewed-by: Alexander Strasser <eclipse7@gmx.net> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_asf: add games to version listZane van Iperen2020-08-11
| | | | | Reviewed-by: Alexander Strasser <eclipse7@gmx.net> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/mpegts: Don't leave context in inconsistent state upon errorAndreas Rheinhardt2020-08-10
| | | | | | | | | | | | | | | Up until now, opening a section filter works as follows: A filter is opened and (on success) attached to the MpegTSContext. Then a buffer for said filter is allocated and upon success attached to the section filter; on error, the filter is simply freed without removing it from the MpegTSContext, leaving the latter in an inconsistent state. This leads to use-after-frees lateron. This commit fixes this by allocating the buffer first; the filter is only opened if the buffer could be successfully allocated. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hlsenc: write temp file for append single file by encryption modeSteven Liu2020-08-10
| | | | | | | | | | | | fix ticket: 8783 Because in single file by encryption mode, it cannot get the last one block of the file, it need ff_format_io_close for get full file size, then hlsenc can get the total size of the encryption content, so write the content into temp file first, and get the temp file content append the temp file content into append to single file, then hlsenc can get the correct file/content size and offset. Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
* avformat/hls: support avio_seek in encryption modeSteven Liu2020-08-10
| | | | Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
* avformat/sierravmd: Don't return packets for non-existing streamAndreas Rheinhardt2020-08-09
| | | | | | | It leads to an assert in ff_read_packet(). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/vividas: Check allocation for successAndreas Rheinhardt2020-08-09
| | | | | Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/vividas: Check return value before storing it in smaller typeAndreas Rheinhardt2020-08-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat: add argo_asf muxerZane van Iperen2020-08-07
| | | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>