summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* mov: Rely on box type rather than file type for colr atomVittorio Giovara2015-04-09
| | | | | | | | Although it's not allowed to use only allows 'nclc' in ISOM files, there are samples that do not always respect this rule. This change prevents atom overread and a spurious color range initialization. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* matroskadec: export cover art correctlywm42015-04-08
| | | | | | | | | | | | | | | | | | Generally, libavformat exports cover art pictures as video streams with 1 packet and AV_DISPOSITION_ATTACHED_PIC set. Only matroskadec exported it as attachment with codec_id set to AV_CODEC_ID_MJPEG. Obviously, this should be consistent, so change the Matroska demuxer to export a AV_DISPOSITION_ATTACHED_PIC pseudo video stream. Matroska muxing is probably incorrect too. I know that it can create broken files with an audio track and just 1 video frame when e.g. remuxing mp3 with APIC to mkv. But for now this commit does not change anything about muxing, and also continues to write attachments with AV_CODEC_ID_MJPEG should the muxer application have special knowledge that the Matroska is broken in this way. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* parseutils: Make av_small_strptime publicLuca Barbato2015-04-07
| | | | | | And use it in libavformat. Based on a similar patch by Stefano Sabatini <stefasab@gmail.com>.
* mpegtsenc: Take max_delay into account when buffering multiple audio packets ↵Martin Storsjö2015-04-03
| | | | | | | | | | into one PES packet Make sure we don't buffer up more than max_delay worth of data before writing a PES packet, even if pes_payload_size is set to a larger value. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Add a buffer_size optionLuca Barbato2015-04-01
| | | | | | And forward it to rtp and udp. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtp: Add an option to set the send/receive buffer sizeLuca Barbato2015-04-01
| | | | It gets forwarded down to UDP.
* rtp: Map the urloptions to AVOptionsLuca Barbato2015-04-01
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* build: Split JPEG-related tables off into a separate componentDiego Biurrun2015-03-30
|
* udp: Fix pkt_size managementLuca Barbato2015-03-29
| | | | | | | | The default value for unset is -1, not 0. Problem introduced in 66028b7ba6b411ba12ef553e9c8f1f4a4fe27710 Bug-Id: 835
* avisynth: update documentation about the avisynth_c.h headerStephen Hutchinson2015-03-24
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avisynth: Fix compilation against current 2.6 header(s).Stephen Hutchinson2015-03-24
| | | | | | | | | AviSynth 2.6 (and by extension, AviSynth+) moves these functions into AVSC_API. This requires both adjusting their normal use, and for AvxSynth, adjusting the position/use of the USING_AVISYNTH ifdefs. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: Write the display matrix in orderVittorio Giovara2015-03-23
| | | | | | | | | | This will allow to copy the matrix as is and it is just cleaner to keep the matrix in the same order specified by the mov standard (which is also explicitly described in the documentation). In order to preserve compatibility, flip the angle sign in the display API av_display_rotation_set() and av_display_rotation_get(), and improve the documentation mentioning the rotation direction.
* movenc: Write the make and model metadata keys for mov style filesMartin Storsjö2015-03-23
| | | | | | | These are essential allowing QuickTime to keep detecting content as slow-motion - this allows preserving them on stream copy. Signed-off-by: Martin Storsjö <martin@martin.st>
* oggdec: Check memory allocationFederico Tomassetti2015-03-21
| | | | | | Bug-Id: CID 1257798 / CID 1257805 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mms: Check memory allocationFederico Tomassetti2015-03-21
| | | | | | Bug-Id: CID 1258462 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rmenc: Check memory allocationFederico Tomassetti2015-03-21
| | | | | | Bug-Id: CID 1257832 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* movenc: write the display transform matrixAnton Khirnov2015-03-19
|
* movenc: Don't assume that fragment durations in pts is equal to duration in dtsMartin Storsjö2015-03-19
| | | | | | | | | | | | | 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-19
| | | | | | | 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-19
| | | | | | | | | 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-19
| | | | | | 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-19
| | | | | | | | | | | | | | | | | | 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-19
| | | | | | | | | | | 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-19
| | | | | | | | | | | | | | | 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-19
| | | | | | | | | | | 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-18
| | | | | | | | | | | | | | 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-17
| | | | | | | | | | 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-17
| | | | | | | 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-17
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* riff: Add 'tshd' FourCC for H.264Vittorio Giovara2015-03-17
|
* isom: Add support for TSCC2Luca Barbato2015-03-17
| | | | As produced by Camtasia 4.
* movenc: Allow interleaving samples when writing fragmented filesMartin Storsjö2015-03-16
| | | | | | | | | | | 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-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-15
| | | | Bug-Id: 833
* udp: Use AVOptionsLuca Barbato2015-03-15
| | | | Add AVOptions for options currently available as url parameters.
* sctp: Update to match tcpLuca Barbato2015-03-15
| | | | Use AVOption and fallback over multiple addresses
* TDSC decoderVittorio Giovara2015-03-13
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* matroskadec: Check memory allocationsVittorio Giovara2015-03-12
| | | | CC: libav-stable@libav.org
* nutdec: Prevent leaks on memory errorVittorio Giovara2015-03-12
| | | | Bug-Id: CID 205122 / CID 205123
* lavf: Explicitly convert types at function pointer assignmentDiego Biurrun2015-03-11
| | | | This fixes a number of "assignment from incompatible pointer type" warnings.
* asfenc: fix leaking asf->index_ptr on errorAndreas Cadhalpun2015-03-11
| | | | | 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-11
| | | | | | | | 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-11
| | | | | | | 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-11
|
* movenc: Support setting fragment_index before the moov atom is writtenMartin Storsjö2015-03-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-10
| | | | | | | | 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-10
| | | | | | | | | | | | 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-10
| | | | | | 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-09
| | | | | | | | 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-09
| | | | | | | This prevents it to be written as unsigned. Also add an error message. CC: libav-stable@libav.org Bug-Id: CID 1265717