summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* rm: Use the correct codec_data_size signednessLuca Barbato2014-12-04
| | | | | | | | | The function takes a size and not an offset. CC: libav-stable@libav.org Sample-Id: rm_deadlock.rm Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mkv: Validate ASS Start and End fieldsLuca Barbato2014-12-03
| | | | CC: libav-stable@libav.org
* Drop the unofficial extension prefix for MPEG and MPEG-TS formatsFlorent Le Coz2014-12-02
| | | | | | | | As per the RFCs: http://tools.ietf.org/html/rfc3555#page-38 http://tools.ietf.org/html/rfc3003 CC: libav-stable@libav.org
* mpegtsenc: recognize .mts as MPEG Transport StreamJean-Baptiste Mardelle2014-12-02
|
* Add support for BDAV/m2ts-mode muxingFredrik Axelsson2014-12-02
| | | | | Signed-off-by: Fredrik Axelsson <fraxbe@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mov: allocate the tag value dynamicallyThilo Borgmann2014-12-02
| | | | | | | | This allows to load metadata entries longer than 1024 bytes. Displaying them is still limited to 1024 characters, but applications can load them fully now. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mov: Add an option for exporting all metadataVittorio Giovara2014-12-02
|
* mov: do not truncate the language-prefixed tagVittorio Giovara2014-12-02
|
* rtsp: move the CONFIG_ macros to the beginning of the checkVittorio Giovara2014-12-02
| | | | | With --disable-optimizations, the DCE of some compilers does not remove such unused code, causing linking failure.
* rtmpproto: Fix a typo in a commentMartin Storsjö2014-11-28
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Avoid a VLA-like constructMartin Storsjö2014-11-28
| | | | | | | This fixes the build on compilers that interpreted the earlier code as a variable length array (which we intentionally disallow). Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Add options to make segment names configurableBryan Huh2014-11-28
| | | | | | | This allows one to specify templated segment names for init-segments, media-segments, and for the base-url in the case of single-file. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccessMartin Storsjö2014-11-28
| | | | | | | | | | | | | | | | | | | | | | Currently, when streaming to an RTMP server, any time a packet of type RTMP_PT_NOTIFY is encountered, the packet is prepended with @setDataFrame before it gets sent to the server. This is incorrect; only packets for onMetaData and |RtmpSampleAccess should invoke @setDataFrame on the RTMP server. Specifically, the current bug manifests itself when trying to stream onTextData or onCuePoint invocations. This fix addresses that problem and ensures that the @setDataFrame is only prepended for onMetaData and |RtmpSampleAccess. Since data is fed to the rtmp_write function in smaller pieces (depending on the calling IO buffer size), we can't generally assume that the whole packet (or even the whole command string) is available at once, therefore we can only check the command string once the full packet has been transferred to us for sending. Based on a patch by Jeffrey Wescott. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmppkt: Make pkt->data reallocableMartin Storsjö2014-11-28
| | | | | | | | We try to avoid mixing av_malloc with av_realloc, since av_malloc may be implemented with functions that can't (formally) be mixed with the functions used in av_realloc. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmpproto: Simplify code for copying data into the output packetMartin Storsjö2014-11-28
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmpproto: Clarify a commentMartin Storsjö2014-11-28
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Revert "lavf: Don't try to update files atomically with renames on windows"Martin Storsjö2014-11-27
| | | | | | | | | This reverts commit b9d08c77a44390b0848c06f20bc0e9e951ba6a3c. After taking MoveFileEx into use, we can replace files with renames on windows as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Use MoveFileEx instead of rename/_wrename on windowsMartin Storsjö2014-11-27
| | | | | | | | | This allows getting the normal unix semantics, where a rename allows replacing an existing file. Based on a suggestion by Reimar Döffinger. Signed-off-by: Martin Storsjö <martin@martin.st>
* Share the utf8 to wchar conversion routine between lavf and lavuMartin Storsjö2014-11-27
| | | | | | | | This doesn't add any dependency on library internals, since this only is a static inline function that gets built into each of the calling functions - this is only to reduce the code duplication. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Expose the fragment index as an avoptionMartin Storsjö2014-11-26
| | | | | | | | This allows setting the right fragment number if doing random-access writing of fragments, and also allows reading the current sequence number. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add a flag for indicating a discontinuous fragmentMartin Storsjö2014-11-26
| | | | | | | | | | | | | | | | | | | | | | | This allows creating a later mp4 fragment without sequentially writing the earlier ones before (when called from a segmenter). Normally when writing a fragmented mp4 file sequentially, the first timestamps of a fragment are adjusted to match the end of the previous fragment, to make sure the timestamp is the same, even if it is calculated as the sum of previous fragment durations. (And for the first packet in a file, the offset of the first packet is written using an edit list.) When writing an individual mp4 fragment discontinuously like this (with potentially writing the earlier fragments separately later), there's a risk of getting a gap in the timeline if the duration field of the last packet in the previous fragment doesn't match up with the start time of the next fragment. Using this requires setting -avoid_negative_ts make_non_negative (or -avoid_negative_ts 0). Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlinkMartin Storsjö2014-11-24
| | | | | | | | | | | | | | | | | | This makes sure that the internal utf8 path names are handled properly - the normal file handling functions assume path names are in the native codepage, which isn't utf8. This assumes that the tools outside of lavf don't use the mkdir definition. (The tools don't do the same reading of command line parameters as wchar either - they probably won't handle all possible unicode file parameters properly, but at least work more predictably if no utf8/wchar conversion is involved.) This is moved further down in os_support.h, since windows.h shouldn't be included before winsock2.h, while io.h needs to be included before the manual defines for lseek functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Don't try to update files atomically with renames on windowsMartin Storsjö2014-11-24
| | | | | | | | | On windows, rename(2) will fail if the target file exists. On unix this trick is used to make sure that people reading the file either will get the full previous file, or the full new version of the file, but no intermediate version. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Document how the duration is retrieved at the end of the fileUwe L. Korn2014-11-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Don't segment all video streams when one stream gets a keyframeMartin Storsjö2014-11-24
| | | | | | | | | This makes sure that segments actually start at a keyframe (and makes sure we don't split segments twice in a row, with one segment consisting of only a handful of packets), when one stream uses b-frames while another one doesn't. Signed-off-by: Martin Storsjö <martin@martin.st>
* sol: simplify sol_codec_id()Vittorio Giovara2014-11-24
| | | | Bug-Id: CID 1238993
* mpegenc: prevent a NULL pointer dereferenceVittorio Giovara2014-11-24
| | | | | CC: libav-stable@libav.org Bug-Id: CID 29261
* dashenc: Don't require the stream bitrate to be knownMartin Storsjö2014-11-22
| | | | | | | | | | | | | Don't write any bitrate attribute if it isn't known. As long as one doesn't want automatic bitrate switching, playback can work just fine even if it isn't set. If strict standard compliance is requested, this is still considered an error, since the attribute is mandatory according to the spec. Based on a patch by Rodger Combs. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Remove a redundant include of sys/stat.hMartin Storsjö2014-11-22
| | | | | | | The same file already includes this header a few lines further above. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvenc: Remove an unused variableMichael Niedermayer2014-11-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* xwma: Do not leak on failure pathLuca Barbato2014-11-21
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1087092
* hdsenc: Clear the previous codec tag when setting up the chained muxerMartin Storsjö2014-11-19
| | | | | | | | | | | | | | The chained flv muxer wants one set of tags - normally this set could be signaled via the AVOutputFormat codec_tag field (as smoothstreamingenc and dashenc do). hdsenc doesn't signal it, since the FLV codec tag arrays aren't exported from flvenc.c. This can lead to the caller keeping an original codec tag from the originating container here, which would then be a mismatch for the FLV muxer. Since we don't really care about what codec tag the caller might have set, just clear it and let the lavf muxer layer set the right one for the chained FLV muxer later instead. Signed-off-by: Martin Storsjö <martin@martin.st>
* hdsenc: Use the right filename in an error messageMartin Storsjö2014-11-19
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: check ff_get_wav_header() return valueVittorio Giovara2014-11-18
| | | | | CC: libav-stable@libav.org Bug-Id: CID 717497
* librtmp: append the correct field to the stringVittorio Giovara2014-11-18
| | | | | | | Also prevent a NULL pointer dereference. CC: libav-stable@libav.org Bug-Id: CID 1250329 / CID 1250331
* lavf: Only initialize s->offset once when using avoid_negative_ts make_zeroMartin Storsjö2014-11-17
| | | | | | | | | | When given a stream starting at dts=0, it would previously consider s->offset as uninitialized and set an offset when the second packet was written, ending up writing two packets with dts=0. By initializing this field to AV_NOPTS_VALUE, we make sure that we only initialize it once, on the first packet. Signed-off-by: Martin Storsjö <martin@martin.st>
* tools: Add a sidxindex toolMartin Storsjö2014-11-17
| | | | | | | This tool can write an MPD file for fragmented MP4 files with a sidx index at the start of the file. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Allow writing a DASH sidx atom at the start of filesMartin Storsjö2014-11-17
| | | | | | | | | | | | | | | | | This is mapped to the faststart flag (which in this case perhaps should be called "shift and write index at the start of the file"), which for fragmented files will write a sidx index at the start. When segmenting DASH into files, there's usually one sidx at the start of each segment (although it's not clear to me whether that actually is necessary). When storing all of it in one file, the MPD doesn't necessarily need to describe the individual segments, but the offsets of the fragments can be fetched from one large sidx atom at the start of the file. This allows creating files for the DASH ISO BMFF on-demand profile. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add tfra entries for all tracks in a moofMartin Storsjö2014-11-17
| | | | | | | | | | | | | | Previously only tfra entries were added for the first track in each moof. The frag_info array used for tfra can also be used for writing other kinds of fragment indexes, where it's more important to include all tracks. When the separate_moof option is enabled (as in ismv), we write a separate moof for each track, so this doesn't make any difference in that case. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Add an MPEG-DASH ISOFF segmenting muxerMartin Storsjö2014-11-17
| | | | | | | | | | | | | | | | | | This is mostly to serve as a reference example on how to segment the output from the mp4 muxer, capable of writing the segment list in four different ways: - SegmentTemplate with SegmentTimeline - SegmentTemplate with implicit segments - SegmentList with individual files - SegmentList with one single file per track, and byte ranges The muxer is able to serve live content (with optional windowing) or create a static segmented MPD. In advanced cases, users will probably want to do the segmenting in their own application code. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add support for writing sidx atoms for DASH segmentsMartin Storsjö2014-11-17
| | | | | | | | | | A flag "dash" is added, which enables the necessary flags for creating DASH compatible fragments. When this is enabled, one sidx atom is written for each track before every moof atom. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Factorize adding fragment info into a separate functionMartin Storsjö2014-11-17
| | | | | | | | By calling this after writing the moof the first time (for calculating the moof size), we can avoid intermediate storage of tfrf_offset in MOVTrack. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Include empty tracks in iods when writing fragmented mp4Martin Storsjö2014-11-17
| | | | | | | | | When writing fragmented streams with an empty initial moov, we won't have any samples in any tracks when writing the moov atom, thus trust that any tracks that are added actually will be present. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvenc: Send new metadata when FLAG_METADATA_UPDATED is set.Andrew Stone2014-11-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* flvenc: move metadata updates into a single functionAndrew Stone2014-11-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Icecast: Send content-type in all casesMarvin Scholz2014-11-15
| | | | | | | | This is needed because Icecast since version 2.4.1 doesn't default to audio/mpeg anymore. AVOption default not used here, since a later check if -content_type is set is performed and would break. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Icecast: Send 100-continue header if possibleMarvin Scholz2014-11-15
| | | | | | | | | | This allows for proper error reporting. Only do this for non-legacy requests as only Icecast >2.4.0 will reply with a proper status. Libav seems to accept both, 100 and 200 status codes, but let's stay close to spec. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* riff: support ProRes in avi (APCN fourcc)Vittorio Giovara2014-11-14
|
* movenc: Require samples before trying to write edtsMartin Storsjö2014-11-08
| | | | | | | This avoids a potential crash if writing a fragmented psp mp4 (which probably is only a hypothetical scenario). Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Avoid leaking locally allocated data when returning on errorsMartin Storsjö2014-11-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>