summaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* movenc: write the display transform matrixAnton Khirnov2015-03-191-9/+21
|
* movenc: Don't assume that fragment durations in pts is equal to duration in dtsMartin Storsjö2015-03-192-9/+25
| | | | | | | | | | | | | For strict CFR, they should be pretty much equal, but if the stream is VFR, there can be a sometimes significant difference. Calculate the pts duration separately, used in sidx atoms and for tfrf/tfxd boxes in smooth streaming ismv files. Also make sure to reduce the duration of sidx entries according to edit lists. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Move sidx edit list timestamp adjustment into a blockMartin Storsjö2015-03-191-4/+4
| | | | | | | When reading these values from track->frag_info, the same adjustment has already been done. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Only adjust the cts offset at the start of fragments if necessaryMartin Storsjö2015-03-191-2/+4
| | | | | | | | | Adjusting it is only necessary when a sidx/tfrf/tfxd atom already has been written for the previous fragment (since the sidx/tfrf/tfxd atoms include the duration between the first pts of the previous fragment, to the first pts of the new fragment). Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Write pts timestamps in tfxd, instead of dts timestampsMartin Storsjö2015-03-191-1/+2
| | | | | | This matches what we write in tfra and tfrf since 9cbf70fa0e. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Set the last packet duration based on the next packet when autoflushingMartin Storsjö2015-03-191-1/+7
| | | | | | | | | | | | | | | | | | When automatically flushing fragments based on set conditions (fragmentation on keyframes, after some interval or byte size), we already have the next packet for one stream - use this for setting the duration of the last packet in the flushed fragment correctly. This avoids having to adjust the timestamp of the first packet in the new fragment since the last duration was unknown. Unfortunately, this only works for automatic flushing (not for caller-triggered flushing, like in the dash muxer), and only for the one single track that triggered the flushing. The duration of the last sample in all other tracks still is dependent on AVPacket duration (or heuristics). Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Heuristically fill in the duration of packets that need itMartin Storsjö2015-03-191-0/+12
| | | | | | | | | | | This avoids that the mp4 muxer does a similar heuristic, adjusting the timestamps in a way that the dash muxer doesn't know the actual timestamps written to the file in the end. By making sure that the mp4 muxer internal heuristic isn't applied, we know the exact timestamps written to file, so that the timestamps in manifest match the files. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Heuristically set the duration of the last sample in a fragment if ↵Martin Storsjö2015-03-192-0/+27
| | | | | | | | | | | | | | | not set Even if this is a guess, it is way better than writing a zero duration of the last sample in a fragment (because if the duration is zero, the first sample of the next fragment will have the same timestamp as the last sample in the previous one). Since we normally don't require libavformat muxer users to set the duration field in AVPacket, we probably can't strictly require it here either, so don't log this as a strict warning, only as info. Signed-off-by: Martin Storsjö <martin@martin.st>
* udp: Fix crashes after adding AVOptionsMartin Storsjö2015-03-191-1/+2
| | | | | | | | | | | Add a missing AVClass member, check whether localaddr is null. (Previously, localaddr was always a local stack buffer, while it now also can be an avoption string which can be null.) This fixes crashes when not passing any localaddr parameter, since 66028b7ba. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Add option to keep exact packet sequence after seekingDerek Buitenhuis2015-03-183-10/+35
| | | | | | | | | | | | | | The current behavior may produce a different sequence of packets after seeking, compared to demuxing linearly from the beginning. This is because the MOV demuxer seeks in each stream individually, based on timestamp, which may set each stream at a slightly different position than if the file would have been read sequentially. This makes implementing certain operations, such as segmenting, quite hard, and slower than need be. Therefore, add an option which retains the same packet sequence after seeking, as when a file is demuxed linearly.
* mov: Fix little endian audio detectionVittorio Giovara2015-03-171-1/+1
| | | | | | | | | | Set this field to TRUE if the audio component is to operate on little-endian data, and FALSE otherwise. However TRUE and FALSE are not defined. Since this flag is just a boolean, interpret all values except for 0 as little endian. Sample-Id: 64bit_FLOAT_Little_Endian.mov
* lavf: Do not list mov-only codecs in riff tagsCarl Eugen Hoyos2015-03-173-4/+13
| | | | | | | Instead check for all mov code-points when demuxing avi and print a warning if a video codec is found like this. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* isom: Add X-Com Radvision FourCCPaul B Mahol2015-03-171-0/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* riff: Add 'tshd' FourCC for H.264Vittorio Giovara2015-03-171-0/+1
|
* isom: Add support for TSCC2Luca Barbato2015-03-171-0/+1
| | | | As produced by Camtasia 4.
* movenc: Allow interleaving samples when writing fragmented filesMartin Storsjö2015-03-162-7/+80
| | | | | | | | | | | This is incompatible with the omit_tfhd_offset flag (writing position independent fragments with interleaving requires the default_base_moof flag). This makes the moof atoms slightly bigger, but can be better for playback (improving locality of sample data in the mdat). Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Support writing multiple trun atomsMartin Storsjö2015-03-161-8/+16
| | | | | | | | | This is needed if all the data for one track isn't continuous within the mdat. Normally we make sure all the data for one track is continuous, but in new cases we will need to have the samples interleaved. Signed-off-by: Martin Storsjö <martin@martin.st>
* mkv: Add support for DVB subtitlesLuca Barbato2015-03-151-0/+1
| | | | Bug-Id: 833
* udp: Use AVOptionsLuca Barbato2015-03-151-6/+53
| | | | Add AVOptions for options currently available as url parameters.
* sctp: Update to match tcpLuca Barbato2015-03-151-20/+60
| | | | Use AVOption and fallback over multiple addresses
* TDSC decoderVittorio Giovara2015-03-131-0/+1
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* matroskadec: Check memory allocationsVittorio Giovara2015-03-121-0/+6
| | | | CC: libav-stable@libav.org
* nutdec: Prevent leaks on memory errorVittorio Giovara2015-03-121-2/+4
| | | | Bug-Id: CID 205122 / CID 205123
* lavf: Explicitly convert types at function pointer assignmentDiego Biurrun2015-03-113-3/+8
| | | | This fixes a number of "assignment from incompatible pointer type" warnings.
* asfenc: fix leaking asf->index_ptr on errorAndreas Cadhalpun2015-03-111-0/+1
| | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* rtpdec_vp9: Drop extra sanity check for size of input packetVittorio Giovara2015-03-111-5/+0
| | | | | | | | In this case len is always at least 1, since it is checked against RTP_VP9_DESC_REQUIRED_SIZE + 1 and then it is reduced by RTP_VP9_DESC_REQUIRED_SIZE before entering the has_pic_id check. Bug-Id: CID 1270811
* mp3: Properly use AVCodecContext APIVittorio Giovara2015-03-111-2/+9
| | | | | | | Rather than having an unitialized context on the stack, allocate it with defaults and free it when unneeded. CC: libav-stable@libav.org
* matroskaenc: Fix type used for chapter timestampsVittorio Giovara2015-03-111-3/+4
|
* movenc: Support setting fragment_index before the moov atom is writtenMartin Storsjö2015-03-102-8/+10
| | | | | | | | | | This way, the caller doesn't need to coordinate setting the option after the moov atom has been written. The downside is that it is no longer possible to use the option for checking whether the moov atom already has been written, but a caller is able to keep track of that by other means anyway. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Don't rely on the fragment index for vc1 info gatheringMartin Storsjö2015-03-102-4/+9
| | | | | | | | The previous use of the mov->fragments field, for determining whether written packets were part of the first fragment or not, didn't work as intended when using the empty_moov flag. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc_mpegts: Set chain->rtp_ctx only after avformat_write_header succeededMartin Storsjö2015-03-101-2/+1
| | | | | | | | | | | | By making sure we at each time only have one pointer set, either a local variable or one in the context, we avoid potential double frees in the cleanup routines. If chain->rtp_ctx is set, it is closed by calling avformat_write_trailer, but that shouldn't be called unless avformat_write_header succeeded. This issue was pointed out by Andreas Cadhalpun. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc_mpegts: Free the right ->pb in the error path in the init functionMartin Storsjö2015-03-101-1/+1
| | | | | | This fixes a typo from 8e32b1f096. Signed-off-by: Martin Storsjö <martin@martin.st>
* siff: Use the correct type for packet size variablesVittorio Giovara2015-03-091-8/+9
| | | | | | | | The avio functions used here return an unsigned value. Also reduce a variable scope. CC: libav-stable@libav.org Bug-Id: CID 1258461
* matroskaenc: Also validate chapter end timeVittorio Giovara2015-03-091-1/+4
| | | | | | | This prevents it to be written as unsigned. Also add an error message. CC: libav-stable@libav.org Bug-Id: CID 1265717
* rtpdec_hevc: Drop extra sanity check for size of input packetVittorio Giovara2015-03-091-8/+0
| | | | | | | In this case len is always at least 3, since it is checked against RTP_HEVC_PAYLOAD_HEADER_SIZE + 1 before entering the switch block. Bug-Id: CID 1238784
* movenc: Avoid writing separate flags for the first sample if not necessaryMartin Storsjö2015-03-091-1/+2
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Set tfhd default sample flags based on actual samples, if possibleMartin Storsjö2015-03-091-10/+15
| | | | | | | | | | This avoids assuming that e.g. audio samples are marked as sync samples. This allows omitting the sample flags from trun, if the default flags happen to be right for all the samples. Signed-off-by: Martin Storsjö <martin@martin.st>
* mxfdec: Fix the error handling for when strftime failsMartin Storsjö2015-03-081-1/+1
| | | | | | The str variable is a char ** here. Signed-off-by: Martin Storsjö <martin@martin.st>
* rmdec: Improve message for demux errorCarl Eugen Hoyos2015-03-081-1/+1
| | | | | | | Use correct context, reduce log level, don't assume it is a video stream, and print the tag of the unknown stream. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* movenc: Keep writing zero-entry stts atoms as intendedMartin Storsjö2015-03-061-6/+6
| | | | | | | | a876585215 had the unintended side effect of returning AVERROR(ENOMEM) when track->entry is zero, while the code intentionally wants to continue in that case. Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Update extradata for mov muxerTimo Rothenpieler2015-03-061-0/+27
| | | | | | | | | | | | The mov muxer already supports picking up extradata that wasn't present during the avformat_write_header call - we just need to propagate it. Since the dash muxer uses delay_moov, we have time up until the first segment is written to get extradata filled in. Also update the codec description string when the extradata becomes available. Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Simplify code by using a local variableTimo Rothenpieler2015-03-061-1/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/adxdec: set avctx->channels in adx_read_headerAndreas Cadhalpun2015-03-051-0/+6
| | | | | | | | | It is used in adx_read_packet, which currently depends on the decoder/parser setting this value between reading the file header and demuxing the first packet. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* rmenc: limit packet sizeAndreas Cadhalpun2015-03-051-0/+8
| | | | | | | | | | | | The chunk size is limited to UINT16_MAX (written by avio_wb16), so make sure that the packet size is not too large. Such large frames need to be split into slices smaller than 64 kB, but that is currently supported neither by the rv10/rv20 encoders nor the rm muxer. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* rtpdec: experimental VP9 depacketizer (draft 0)Thomas Volkert2015-03-055-2/+299
| | | | | | The code was tested with live555 server. Signed-off-by: Martin Storsjö <martin@martin.st>
* rdt: Use a separate variable to clarify the different value namespacesMartin Storsjö2015-03-051-3/+3
| | | | | | | | The original flags variable contains rtpdec flags, while the rmflags variable contains RM flag bits which have a completely different definition. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_qt: Use a local variable instead of RTP_FLAG_KEYMartin Storsjö2015-03-051-5/+5
| | | | | | | | The only case where RTP_FLAG_KEY actually is needed is in RDT, where such a flag needs to be passed via the rtpdec parse function's flags parameter. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_asf: Don't set RTP_FLAG_KEYMartin Storsjö2015-03-051-2/+0
| | | | | | | | Nothing in the framework nor in the rest of the depacketizer actually uses this flag - the chained demuxer sets the keyframe flag properly on demuxed packets already. Signed-off-by: Martin Storsjö <martin@martin.st>
* flv: Validate and reject unsupported codecsLuca Barbato2015-03-041-16/+17
| | | | | | And provide a more informative message in case of failure. CC: libav-stable@libav.org
* dca: Move syncword definitions to a separate headerDiego Biurrun2015-03-042-13/+11
|
OpenPOWER on IntegriCloud