summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* 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>
* movenc: Remove an outdated commentMartin Storsjö2014-11-08
| | | | | | | QuickTime does support files with an empty initial movie these days. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Write correct presentation timestamps in tfraMartin Storsjö2014-11-07
| | | | | | | Previously we wrote decoding timestamps here, while the specs say it should be presentation timestamps. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Remove a now redundant checkMartin Storsjö2014-11-07
| | | | | | | | | | When using the new first_trun flag instead of checking the track id, we don't need to have a special case for the separate_moof flag any longer. This simplifies the complicated codepath ever so slightly. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Allow to request not to use edit listsMartin Storsjö2014-11-07
| | | | | | | | | | | | | | | | | | | In this case, shift tracks to start from zero instead (potentially stretching the first sample in tracks that start later than the first one). Some software does not support edit lists at all, the adobe flash player seems to be one of these. This results in AV sync errors when edit lists are used to adjust AV sync. Some players, such as QuickTime, don't respect the duration for audio packets, so if an audio track starts later than the video track and the first audio sample gets a duration longer than the actual amount of data in it, the result will be out of sync. Based on patches by Michael Niedermayer. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Print a warning if failed to avoid negative timestamps when requestedMichael Niedermayer2014-11-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Add an option for avoiding negative timestampsMichael Niedermayer2014-11-07
| | | | | | | | | | | This is the same logic as is invoked on AVFMT_TS_NEGATIVE, but which can be enabled manually, or can be enabled in muxers which only need it in certain conditions. Also allow using the same mechanism to force streams to start at 0. Signed-off-by: Martin Storsjö <martin@martin.st>
* nutdec: do not set has_b_framesAnton Khirnov2014-11-06
| | | | It is not supposed to be set by demuxers.
* oggenc: accept only STREAMINFO extradataAnton Khirnov2014-11-06
| | | | | The reasoning is the same as for 0097cbea695e534fce39958ccd103af2fbf65831.
* lavf: stop using avpriv_flac_parse_streaminfo()Anton Khirnov2014-11-06
| | | | | | The only parameters needed by the demuxers are the sample rate and sample count, which can be trivially extracted manually, without resorting to an avpriv function.
* riffenc: do not fall back on AVCodecContext.frame_size for MP3Anton Khirnov2014-11-06
| | | | | | | It will not be set unless the codec context is used as the encoding context, which is discouraged. For MP2, av_get_audio_frame_duration() will already set the frame size properly. For MP3, set the frame size explicitly.
* lavf: use the format context strict_std_compliance instead of the codec oneAnton Khirnov2014-11-06
|
* lavc,lavf: switch to the new vorbis parse APIAnton Khirnov2014-11-06
|
* lavc: add a public API for parsing vorbis packets.Anton Khirnov2014-11-06
| | | | | | It is required by (at least) the ogg demuxer. Mark the current semi-public apriv API for removal.
* vorbis_parser: add an AV prefix to VorbisParseContextAnton Khirnov2014-11-06
| | | | This is done in preparation for making it public.
* rtmpproto: Ignore errors from the getStreamLength methodMartin Storsjö2014-11-05
| | | | | | | | | | It is never an error if this method failed. If rt->live was explicitly set to 0 (known to be a recorded file), print it as a warning, otherwise print it as a debug message. Based on a patch by Michael Niedermayer. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Define the flag bits using shifts instead of as decimal numbersMartin Storsjö2014-11-03
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Don't write any iso brands in ismv filesMartin Storsjö2014-10-30
| | | | | | We deviate slightly from the iso specs for these files. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Don't write any tfdt atom for ismv filesMartin Storsjö2014-10-30
| | | | | | | | | The tfdt atom shouldn't be needed in those cases, we already write tfxd atoms for ismv anyway, which is roughly equivalent. This avoids having to declare the iso6 brand for ismv files. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Write a 0 duration in mdhd and tkhd for an empty initial moovMartin Storsjö2014-10-30
| | | | | | | | | | | | | | ISO/IEC 14496-12:2012/Cor 1:2013 is explicit about how this should be handled. All zeros doesn't mean that the full file has got a zero duration, only that the track samples described within the initial moov have got zero duration. An all ones duration means an indeterminate duration. Keep writing a duration consisting of all ones for the ISM mode - older windows media player versions won't play a file if this is zero. (Newer windows media player versions play either version fine.) Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add a flag for using default-base-is-moof in tfhd atomsMartin Storsjö2014-10-29
| | | | | | | | | | | | Similarly to the omit_tfhd_offset flag added in e7bf085b, this avoids writing absolute byte positions to the file, making them more easily streamable. This is a new feature from 14496-12:2012, so application support isn't necessarily too widespread yet (support for it in libav was added in 20f95f21f in July 2014). Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Signal iso6 in compatible_brands when using tfdtMartin Storsjö2014-10-29
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Use a local variable consistentlyMartin Storsjö2014-10-29
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Don't check the custom IO flag when using faststartMartin Storsjö2014-10-29
| | | | | | | | The custom IO flag actually never is set for muxers, only for demuxers, so the check was pointless (unless a user intentionally would set the flag to signal using custom IO). Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Don't use track_id to decide which track is the first in a moofMartin Storsjö2014-10-29
| | | | | | | | | | If one track doesn't have any samples within a moof, no traf/trun is written for it. When the omit_tfhd_offset flag is set, none of the tfhd atoms have any base_data_offset set, and the implicit offset (end of previous track fragment data, or start of the moof for the first trun) is used. Signed-off-by: Martin Storsjö <martin@martin.st>
* bethsoftvid: simplify return handlingVittorio Giovara2014-10-29
| | | | Fixes a double free in case of av_packet_new_side_data() failure.
* assdec: check av_new_packet return valueVittorio Giovara2014-10-29
| | | | | CC: libav-stable@libav.org Bug-Id: CID 703626
* mtv: improve header check and avoid division by zeroVittorio Giovara2014-10-29
| | | | | CC: libav-stable@libav.org Bug-Id: CID 732203 / CID 732204
* oggenc: remove unneeded null checkMichael Niedermayer2014-10-29
| | | | | | | The code would have segfaulted before if oggstream were NULL. CC: libav-stable@libav.org Bug-Id: CID 732218