summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* avformat/dashdec: Avoid multiple HTTP requests for initialization segment ↵Steven Liu2018-04-17
| | | | | | | that is common among all representations Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: sanilraut <raut.sanil@gmail.com>
* avformat/hls: remove redundant codeSteven Liu2018-04-17
| | | | | Reviewed-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/flacenc: add flac_init()James Almer2018-04-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flacenc: support writing attached picturesRodger Combs2018-04-16
| | | | | | Usage of packet queueing API and some cleaning done by the committer. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: forbid muxing AV1 streams until the spec is finishedJames Almer2018-04-16
| | | | | | | This prevents creating potentially broken files, as both the AV1 and the AV1 in ISOMBFF specs are unfinished. Signed-off-by: James Almer <jamrial@gmail.com>
* Bump minor versions after release/4.0 branchingMichael Niedermayer2018-04-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions for branching release/4.0Michael Niedermayer2018-04-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hlsenc: avformat/hlsenc: add error message for encrypt fmp4 modeSteven Liu2018-04-16
| | | | | | | and refine the warning message when use both hls_key_info_file and hls_enc Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/utils: use the existing packet reference when parsing complete framesJames Almer2018-04-13
| | | | | | | | | | | | If the parser returns full frames, then the output pointer retured by av_parser_parse2() is guaranteed to point to data contained in the input packet's buffer. Create a new reference to said buffer in that case, to avoid unnecessary data copy when queueing the packet later in the function. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: Check cur_dts in update_initial_timestamps() moreMichael Niedermayer2018-04-13
| | | | | | | | | Fixes: runtime error: signed integer overflow: 18133149658382192 - -9223090561878065151 cannot be represented in type 'long long' Fixes: crbug 831552 Reported-by: Matt Wolenetz <wolenetz@google.com> Reviewed-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: Fix integer overflow in end time calculation in ↵Michael Niedermayer2018-04-13
| | | | | | | | | | update_stream_timings() Fixes: crbug 829153 Reported-by: Matt Wolenetz <wolenetz@google.com> Reviewed-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: Stream specifier enhancement 2.Bela Bodecs2018-04-13
| | | | | | | | | | | | | | | | | In some cases, mainly working with multiprogram mpeg-ts containers as input, it would be handy to select sub stream of a specific program by their metadata. This patch makes it possible to narrow the stream selection among streams of the specified program by stream metadata. Examples: p:601:m:language:hun will select all sub streams of program with id 601 where sub streams have metadata key named 'language' with value 'hun'. p:602:m:guide will select all sub streams of program with id 602 where sub streams have metadata key named 'guide'. Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hlsenc: add option hls_delete_thresholdSteven Liu2018-04-13
| | | | | | | | | | | When using hls_list_size with hls_flags delete_segments, currently hls_list_size * 2 +- segments remain on disk. With this new option, the amount of disk space used can be controlled by the user. fix ticket: #7131 Signed-off-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Aman Gupta <aman@tmm1.net>
* avformat/mov: Fix extradata memleakMichael Niedermayer2018-04-12
| | | | | | | | Fixes: crbug 822705 Reported-by: Matt Wolenetz <wolenetz@google.com> Reviewed-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: Stream specifier enhancementBela Bodecs2018-04-12
| | | | | | | | | | | | | | | | | | | | Currently when specifying the program id you can only decide to select all stream of the specified program (e.g. p:103 will select all streams of program 103) or narrow the selection to a specific stream sub index (e.g. p:145:1 will select 2nd stream of program 145.) But you can not specify like all audio streams of program 145 or 3rd video stream of program 311. In some case, mainly working with multiprogram mpeg-ts containers as input, this feature would be handy. This patch makes it possible to narrow the stream selection among streams of the specified program by stream type and optionally its index. Handled types: a, v, s, d. Examples: p:601:a will select all audio streams of program 601, p:603:a:1 will select 2nd audio streams of program 603, p:604:v:0 will select first video stream of program 604. Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/hlsproto: use ff_get_chomp_lineJun Zhao2018-04-12
| | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavf/hlsenc: use ff_get_chomp_lineJun Zhao2018-04-12
| | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavf/hls: use ff_get_chomp_lineJun Zhao2018-04-12
| | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavf/aviobuf: add ff_get_chomp_lineJun Zhao2018-04-12
| | | | | | | Same as ff_get_line but strip the white-space characters in the string tail. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* libavformat/aac: Parse all ID3 tags present between ADTS framesMattias Amnefelt2018-04-12
| | | | | | | | Some ADTS streams can have multiple ID3 tags between frames. This change parses all of them, rather than just the first one. Signed-off-by: Mattias Amnefelt <mattiasa@avm.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* spdifenc: support ac3 core+eac3 dependent streamsHendrik Leppkes2018-04-11
| | | | | | | | | Such streams are found on Blu-ray, and identified as EAC3 type in avformat, while the bitstream of the core stream is actually a pure AC3 frame. Adjust the parsing accordingly, since AC3 frames always hold 6 blocks and the numblkscod syntax element is not present.
* avformat/hlsenc: fix handling of delete_segments when %v is presentBela Bodecs2018-04-11
| | | | | | | | | | | | | | | | | | | | When var_stream_map option is used, %v must appear either in segment name template or in the directory path. This latter case currently is not handled and delete_segments flag of hls_flags is broken now. This patch fix this. The root cause of the bug was that HLSSegment struct only stores the final filename part, but not the final directory path. Most of the cases, final path info is unneded, It only necessary when you want to delete old segments (e.g in case of live streaming). Without variant streams it was unnecessary to store the final directory path, because all segment were stored into the same directory. But introducing %v in directory names either require to store the final directory path into HLSSegment or associate segments with their variant streams to be able deleting them later. I have choosen the second solution and introduced a variant index data member into the segment struct. Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu> Signed-off-by: Steven Liu <lq@onvideo.cn>
* avformat/movenc: use correct iTunes copyright atomTimo Teräs2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for writing copyright metadata was added in commit bed4fc54c9 for 3GP, MOV and iTunes metadata. 3GP and MOV cases are formally specified. However, iTunes format does not have specification, and it seems to have been assumed that it would use the same atom as MOV (both being Apple formats). However, Apple uses 'cprt' atom for iTunes metadata (do note that the iTunes 'cprt' encoding is generic iTunes ItemList atom, not the 3GP 'cprt' encoding. These are also inside different parent atoms). Most references trying to document iTunes atoms mention only the 'cprt' tag. See: - http://atomicparsley.sourceforge.net/mpeg-4files.html - http://mutagen.readthedocs.io/en/latest/api/mp4.html Same applies to other software supporting this tag. Most of them encode and decode only the 'cprt' atom. ffmpeg mov demuxer supports both atoms in this context. There are few pieces of other software that support similarly both 'cprt' and the incorrect '\251cpy' atom in this context. I believe they do it in order to read the ffmpeg encoded incorrect copyright atom. In light of the above this changes the copyright atom to 'cprt' as it seems to be supported univerally and is the correct atom to use. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Sega FILM: set dts and duration when demuxingMisty De Meo2018-04-10
| | | | | Reviewed-by: Kyle Swanson <k@ylo.ph> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/segafilmenc: Do not mix variable declaration and code.Carl Eugen Hoyos2018-04-10
| | | | Fixes two warnings: ISO C90 forbids mixed declarations and code
* avformat/matroskadec: reference the existing data buffer when creating packetsJames Almer2018-04-06
| | | | | | | | | | Newly allocated data buffers (wavpack, prores, compressed buffers) are padded to meet the requirements of AVPacket. About 10x speed up in matroska_parse_frame(). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: factor the prores packet parsing code outJames Almer2018-04-06
| | | | | | | | Simplifies code in matroska_parse_frame(). This is in preparation for the following patch. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: use refcounted buffers in EbmlBinJames Almer2018-04-06
| | | | | | | | | Data in EbmlBin objects is never changed after being read from the input file (save for two specific cases with encoded CodePrivate), so using AVBufferRef we can prevent unnecessary copy of data by instead creating new references to said constant data. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/amr: Stricter heuristic for auto-detection.Carl Eugen Hoyos2018-04-06
| | | | Fixes ticket #7125.
* Add Sega FILM muxerMisty De Meo2018-04-05
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* avformat/mov: Fix parsing of tfdt when using sample descriptors.Jacob Trimble2018-04-05
| | | | | Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: add rtp_hinting_needed() helper functionTimo Teräs2018-04-04
| | | | | | | | This is shared test and this simplifies code a bit. Follow up commit will have additional tests for this function. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/matroskadec: address some more missing AVPacket freesJames Almer2018-04-04
| | | | | | Fixes memleaks. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: address a missing AVPacket freeJames Almer2018-04-04
| | | | | | Fixes memleaks. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mp3enc: use AVPacketList helper functions to queue packetsJames Almer2018-04-04
| | | | | | | Simplifies code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/ttaenc: use AVPacketList helper functions to queue packetsJames Almer2018-04-04
| | | | | | Simplifies code. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: use AVPacketList to queue packetsJames Almer2018-04-04
| | | | | | It's more robust and efficient. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: optimize ff_packet_list_free()James Almer2018-04-04
| | | | | | Don't constantly overwrite the list's head pointer. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: make AVPacketList helper functions sharedJames Almer2018-04-04
| | | | | | Based on a patch by Luca Barbato. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/hls: Remove the dead code in parse_playlist()Jun Zhao2018-04-04
| | | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com> Reviewed-by: Steven Liu <lq@onvideo.cn>
* avformat/options_table: Change the seek2any location in opt table.Jun Zhao2018-04-02
| | | | | | | | Change the seek2any location in avformat_options to make code more readable. Signed-off-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: make use of avio_get_str()Paul B Mahol2018-04-02
| | | | | | Also do not set empty metadata. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* 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/utils: use av_packet_make_refcounted to ensure packets are ref countedJames Almer2018-04-02
| | | | | | Simplifies code, while also fixing a potential leak of side data in pkt. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/img2dec: use new iteration APIJosh de Kock2018-04-02
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* lav*,tests: remove several register_all callsJosh de Kock2018-04-02
| | | | | | | avdevice_register_all() is still required to register devices into lavf (this is required due to lavd being somewhat of a hack). Signed-off-by: Josh de Kock <josh@itanimul.li>
* lavf/format: use const AVInputFormat for iterationJosh de Kock2018-04-02
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* Revert "avformat/format: temporarily use old next api"Josh de Kock2018-04-02
| | | | | | | | | This reverts commit 909e00ae816df9b6a05b1c4d0cafb794d4d0ca28. There is no need to use the old API anymore as the new API now behaves in the same way (treating devices as formats when loaded). Signed-off-by: Josh de Kock <josh@itanimul.li>
* lavf/allformats: remove left-over index decrementJosh de Kock2018-04-02
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* lavf: move avpriv function definition to internal.hJosh de Kock2018-04-02
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>