summaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* libavformat/http: add support for content_type option in listen modeMoritz Barsnick2016-08-141-1/+1
| | | | | | | | | Instead of silently ignoring the content_type option in listen mode, apply its value to the provided "Content-Type:" header. Signed-off-by: Moritz Barsnick <[email protected]> Reviewed-by: Nicolas George <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* lavc/raw: Support QT b64a ARGB64 rawvideo.Carl Eugen Hoyos2016-08-132-1/+2
| | | | | Decoder based on a patch by v0lt, v0lt rambler ru Fixes ticket #5657.
* libavformat/http: add support for headers option in listen modeMoritz Barsnick2016-08-121-1/+5
| | | | | | | | Instead of silently ignoring the headers option in listen mode, use the provided headers. Signed-off-by: Moritz Barsnick <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avisynth: simplify the pix_fmt check for the newer AviSynth APIStephen Hutchinson2016-08-111-22/+5
| | | | | | | The values don't need to be hardcoded since the correct values are returned by avs_bits_per_pixel. Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/id3v2: fix memleak with empty stringsMichael Niedermayer2016-08-111-1/+4
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* libavformat/mxfenc: add UID for unconstrained H.264 coded video in baseline ↵Matthias Hunstock2016-08-111-0/+2
| | | | | | | | | profile Enable the MXF muxer to mux baseline H.264 video streams. Signed-off-by: Matthias Hunstock <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/id3v2: Mark variable as unused to avoid "set but not used" warningMichael Niedermayer2016-08-081-1/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat: read id3v2 comment tagsChris Moeller2016-08-071-0/+42
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mov: Enable mp3 parsing if a packet needs itMichael Niedermayer2016-08-061-0/+5
| | | | | | Fixes Ticket5689 Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/teeproto: set forgotten url_close()Michael Niedermayer2016-08-051-0/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* lavf: forward protocol_whitelist for the remaining casesAndreas Cadhalpun2016-08-053-0/+26
| | | | | | | Also set a default_whitelist for mmsh and ffrtmphttp. Signed-off-by: Andreas Cadhalpun <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/img2enc: Use AV_FRAME_FILENAME_FLAGS_MULTIPLE, support tee:Michael Niedermayer2016-08-041-1/+3
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/hlsenc: Use AV_FRAME_FILENAME_FLAGS_MULTIPLE, support tee:Michael Niedermayer2016-08-041-4/+6
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat: Add av_get_frame_filename2() and AV_FRAME_FILENAME_FLAGS_MULTIPLEMichael Niedermayer2016-08-043-3/+15
| | | | | | | This will be used to allow writing file sequences using the tee output onto multiple places in parallel Signed-off-by: Michael Niedermayer <[email protected]>
* avformat: add a TTA MuxerJames Almer2016-08-044-2/+152
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/tta: remove custom crc callback functionJames Almer2016-08-041-8/+2
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/avio: add a crc callback function for CRC-32 IEEE-LEJames Almer2016-08-042-0/+8
| | | | | | Reviewed-by: Nicolas George <[email protected]> Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/teeproto: Support parsing protocol optionsMichael Niedermayer2016-08-032-6/+15
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/oggdec: Fix integer overflow with invalid ptsMichael Niedermayer2016-08-031-0/+5
| | | | | | | | | If negative pts are possible for some codecs in ogg then the code needs to be changed to use signed values. Found-by: Thomas Guilbert <[email protected]> Fixes: clusterfuzz_usan-2016-08-02 Signed-off-by: Michael Niedermayer <[email protected]>
* doxygen: Standardize root-level modulesTimothy Gu2016-08-021-2/+4
|
* avformat/tee: Factor parse_slave_options() outMichael Niedermayer2016-08-024-43/+101
| | | | | Reviewed-by: Nicolas George <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/rmdec: Do not return EIO on EOF.Carl Eugen Hoyos2016-08-021-1/+3
| | | | Reported-by: applemax82
* Merge commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c'James Almer2016-08-011-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | * commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c': h264: add H264_ prefix to the NAL unit types Conflicts: libavcodec/h264_parse.c libavcodec/h264_parser.c libavcodec/h264_slice.c libavcodec/h264dec.c Merged-by: James Almer <[email protected]>
* | avformat/matroskaenc: fix Voids with size < 10Michael Bradshaw2016-07-311-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | libavformat/matroskadec: Add test for seeking with codec delay.Chris Cunningham2016-07-301-1/+1
| | | | | | | | | | | | Also cleanup parens for the skip_to_timecode check. Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/rmdec: Clear extradata when extradata_size is clearedMichael Niedermayer2016-07-291-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'Clément Bœsch2016-07-291-1/+1
|\| | | | | | | | | | | | | * commit '251cbb44003caf179fb17afbb8a6c56643c2a646': h264: create a new header for common h264 definitions Merged-by: Clément Bœsch <[email protected]>
* | Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'Clément Bœsch2016-07-291-1/+1
|\| | | | | | | | | | | | | * commit '9df889a5f116c1ee78c2f239e0ba599c492431aa': h264: rename h264.[ch] to h264dec.[ch] Merged-by: Clément Bœsch <[email protected]>
| * Add TrueMotion 2.0 Real Time decoderPaul B Mahol2016-06-201-0/+1
| | | | | | | | | | Signed-off-by: Paul B Mahol <[email protected]> Signed-off-by: Vittorio Giovara <[email protected]>
| * Add MagicYUV decoderPaul B Mahol2016-06-202-0/+9
| | | | | | | | | | Signed-off-by: Paul B Mahol <[email protected]> Signed-off-by: Vittorio Giovara <[email protected]>
* | lavf/mpegtsenc: add special case for handling timed ID3 packetsStefano Sabatini2016-07-291-0/+3
| | | | | | | | | | | | Set the stream_id to 0xbd (private_stream_id_1). Tools seem to assume that value, and this is consistent with MPEG TS specification (ITU-T H.222.0 section 2.12.3).
* | avformat/matroskaenc: Write duration early during mkv_write_header (Rev #3)softworkz2016-07-281-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rev #2: Fixes doubled header writing, checked FATE running without errors Rev #3: Fixed coding style This commit addresses the following scenario: we are using ffmpeg to transcode or remux mkv (or something else) to mkv. The result is being streamed on-the-fly to an HTML5 client (streaming starts while ffmpeg is still running). The problem here is that the client is unable to detect the duration because the duration is only written to the mkv at the end of the transcoding/remoxing process. In matroskaenc.c, the duration is only written during mkv_write_trailer but not during mkv_write_header. The approach: FFMPEG is currently putting quite some effort to estimate the durations of source streams, but in many cases the source stream durations are still left at 0 and these durations are nowhere mapped to or used for output streams. As much as I would have liked to deduct or estimate output durations based on input stream durations - I realized that this is a hard task (as Nicolas already mentioned in a previous conversation). It would involve changes to the duration calculation/estimation/deduction for input streams and propagating these durations to output streams or the output context in a correct way. So I looked for a simple and small solution with better chances to get accepted. In webmdashenc.c I found that a duration is written during write_header and this duration is taken from the streams' metadata, so I decided for a similar approach. And here's what it does: At first it is checking the duration of the AVFormatContext. In typical cases this value is not set, but: It is set in cases where the user has specified a recording_time or an end_time via the -t or -to parameters. Then it is looking for a DURATION metadata field in the metadata of the output context (AVFormatContext::metadata). This would only exist in case the user has explicitly specified a metadata DURATION value from the command line. Then it is iterating all streams looking for a "DURATION" metadata (this works unless the option "-map_metadata -1" has been specified) and determines the maximum value. The precendence is as follows: 1. Use duration of AVFormatContext - 2. Use explicitly specified metadata duration value - 3. Use maximum (mapped) metadata duration over all streams. To test this: 1. With explicit recording time: ffmpeg -i file:"src.mkv" -loglevel debug -t 01:38:36.000 -y "dest.mkv" 2. Take duration from metadata specified via command line parameters: ffmpeg -i file:"src.mkv" -loglevel debug -map_metadata -1 -metadata Duration="01:14:33.00" -y "dest.mkv" 3. Take duration from mapped input metadata: ffmpeg -i file:"src.mkv" -loglevel debug -y "dest.mkv" Regression risk: Very low IMO because it only affects the header while ffmpeg is still running. When ffmpeg completes the process, the duration is rewritten to the header with the usual value (same like without this commit). Signed-off-by: SoftWorkz <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/hls: Fix missing streams in some cases with MPEG TSAnssi Hannula2016-07-281-5/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HLS demuxer calls the subdemuxer avformat_find_stream_info() while overriding the subdemuxer AVFMTCTX_NOHEADER flag by clearing it. However, this prevents some streams in some MPEG TS streams from being detected properly. Simply removing the clearing of the flag would cause the inner avformat_find_stream_info() call to take longer in some cases, without a way to control it. To fix the issue, do not clear the flag but propagate it to HLS demuxer. To avoid the above-mentioned mandatory delay, the call to avformat_find_stream_info() is dropped except in the HLS ID3 timestamped case. The HLS demuxer user should be calling avformat_find_stream_info() on the HLS demuxer if it wants to find the stream info. The main streams are now created dynamically after read_header time if the subdemuxer uses AVFMTCTX_NOHEADER (mpegts). Subdemuxer avformat_find_stream_info() is still called for the HLS ID3 timestamped case as the HLS demuxer needs to know the packet durations to properly interleave ID3 timestamped streams with MPEG TS streams on sub-segment level. Fixes ticket #4930.
* | avformat/hls: Move stream propagation to a separate functionAnssi Hannula2016-07-281-65/+69
| | | | | | | | | | | | | | Creation of main demuxer streams from subdemuxer streams is moved to update_streams_from_subdemuxer() which can be called repeatedly. There should be no functional changes.
* | avformat/hls: Use an array instead of stream offset for stream mappingAnssi Hannula2016-07-281-21/+38
| | | | | | | | | | This will be useful when the amount of streams per subdemuxer is not known at hls_read_header time in a following commit.
* | avformat/hls: Sync starting segment across variants on live streamsAnssi Hannula2016-07-281-1/+24
| | | | | | | | | | This will avoid a large time difference between variants in the most common case.
* | avformat/hls: Fix regression with ranged media segmentsAnssi Hannula2016-07-281-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 81306fd4bdf ("hls: eliminate ffurl_* usage", merged in d0fc5de3a6) changed the hls demuxer to use AVIOContext instead of URLContext for its HTTP requests. HLS demuxer uses the "offset" option of the http demuxer, requesting the initial file offset for the I/O (http URLProtocol uses the "Range:" HTTP header to try to accommodate that). However, the code in libavformat/aviobuf.c seems to be doing its own accounting for the current file offset (AVIOContext.pos), with the assumption that the initial offset is always zero. HLS demuxer does an explicit seek after open_url to account for cases where the "offset" was not effective (due to the URL being a local file or the HTTP server not obeying it), which should be a no-op in case the file offset is already at that position. However, since aviobuf.c code thinks the starting offset is 0, this doesn't work properly. This breaks retrieval of ranged media segments. To fix the regression, just drop the seek call from the HLS demuxer when the HTTP(S) protocol is used.
* | avformat/utils: Fix find_stream_info not considering the extradata it foundAnssi Hannula2016-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9200514ad8717c6 ("lavf: replace AVStream.codec with AVStream.codecpar") merged in commit 6f69f7a8bf6a0d01 changed avformat_find_stream_info() to put the extradata it got from st->parser->parser->split() to st->internal->avctx instead of st->codec (extradata in st->internal->avctx will be later copied to st->codecpar). However, in the same function, the "is stream ready?" check was changed to check for extradata in st->codecpar instead of st->codec, even though st->codecpar is not yet updated at that point. Extradata retrieved from split() is therefore not considered anymore, and avformat_find_stream_info() will therefore needlessly continue probing in some cases. Fix that by checking for the extradata at st->internal->avctx where it is actually put.
* | avformat/flvdec: parse keyframe before a\v stream was created ↵Xinzheng Zhang2016-07-271-2/+6
| | | | | | | | | | | | add_keyframes_index() when stream created or keyframe parsed Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/flvdec: splitting add_keyframes_index() out from ↵Xinzheng Zhang2016-07-271-16/+60
| | | | | | | | | | | | parse_keyframes_index() Signed-off-by: Michael Niedermayer <[email protected]>
* | librtmp: Avoid an infiniloop setting connection argumentsLuca Barbato2016-07-261-0/+2
| | | | | | | | | | | | The exit condition was missing. Signed-off-by: Timothy Gu <[email protected]>
* | avformt/matroskaenc: undo an accidental revert by commit 5d48e4eaJames Almer2016-07-261-9/+12
| | | | | | | | | | | | | | Commit 5d48e4eafa6c4559683892b8638d10508125f3cf accidentally reverted changes made to matroskaenc by commit 989a614b707dcff8abdffe28dc24ec64a83b2837. Signed-off-by: James Almer <[email protected]>
* | libavformat/rtpdec_asf: zero initialize the AVIOContext structKacper Michajłow2016-07-251-1/+1
| | | | | | | | | | | | | | This fixes crash in avformat_open_input() when accessing protocol_whitelist field. Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/dnxhddata: move avpriv_dnxhd_parse_header_prefix to a headerJames Almer2016-07-252-2/+2
| | | | | | | | | | | | | | | | | | It's a small and simple function that can be inlined. This removes one private symbol and should reduce object dependencies with the next major bump Signed-off-by: James Almer <[email protected]>
* | avformat/tee: Rescale ts using av_packet_rescale_tsJan Sebechlebsky2016-07-231-3/+1
| | | | | | | | | | | | | | | | | | This ensures that AV_NOPTS_VALUE value is handled correctly. Reviewed-by: Nicolas George <[email protected]> Signed-off-by: Jan Sebechlebsky <[email protected]> Signed-off-by: Marton Balint <[email protected]>
* | libavformat/movenc: add dnxhr compatibility for apple playersMark Reid2016-07-231-5/+26
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | libavformat/matroskadec: fix unsigned overflow to improve seekingChris Cunningham2016-07-231-1/+4
| | | | | | | | | | | | | | | | | | When seeking a file where codec delay is greater than 0, the timecode can become negative after offsetting by the codec delay. Failing to cast to a signed int64 will cause the check against skip_to_timecode to evaluate true for these negative values. This breaks the "skip_to" seek mechanism. Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/teeproto: Fix memset sizeofMichael Niedermayer2016-07-221-1/+1
| | | | | | | | | | Found-by: James Almer <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/mov: Do not allocate empty extradataMichael Niedermayer2016-07-211-5/+7
| | | | | | | | | | | | Fixes Ticket5723 Signed-off-by: Michael Niedermayer <[email protected]>
* | libavformat/rawenc: add dnxhr raw format extensionMark Reid2016-07-211-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>