summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* matroska: don't overwrite string values until read/alloc was succesful.Ronald S. Bultje2012-02-25
| | | | | | | | | | | | This prevents certain tags with a default value assigned to them (as per the EBML syntax elements) from ever being assigned a NULL value. Other parts of the code rely on these being non-NULL (i.e. they don't check for NULL before e.g. using the string in strcmp() or similar), and thus in effect this prevents crashes when reading of such specific tags fails, either because of low memory or because of targeted file corruption. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* lavf: move the packet keyframe setting code.Anton Khirnov2012-02-24
| | | | | | | | | | compute_pkt_fields() is for unreliable estimates or guessing. The keyframe information from the parser is (at least in theory) reliable, so it should be used even when the other guessing is disabled with the AVFMT_FLAG_NOFILLIN flag. Therefore, move setting the packet keyframe flag based on parser information from compute_pkt_fields() to read_frame_internal().
* oggenc: free comment header for all codecsJustin Ruggles2012-02-24
| | | | | | fixes a memleak for Vorbis and Theora, where the comment header from avpriv_split_xiph_headers() is replaced by a buffer that must be freed separately.
* lavf/output-example: use new audio encoding API correctly.Anton Khirnov2012-02-24
|
* lavf/output-example: more proper usage of the new API.Anton Khirnov2012-02-24
| | | | Passing the codec into avformat_new_stream() is preferred.
* apetag: do not leak memory if avio_read() failsPaul B Mahol2012-02-23
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* apetag: propagate errors.Ronald S. Bultje2012-02-23
| | | | | | | Fixes crashes if reading the tag value fails. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* swf: check return values for av_get/new_packet().Ronald S. Bultje2012-02-23
| | | | | | | Prevents crashers when using the packet if allocation failed. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* rtpenc: Expose the max packet size via an avoptionMartin Storsjö2012-02-23
| | | | | | | | | | This allows opting for a lower MTU than what the AVIOContext indicated, and allows writing into outputs that don't indicate an MTU at all (such as plain files, which is useful for testing). This also allows querying for the MTU via the avoption. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Move max_packet_size to a context variableMartin Storsjö2012-02-23
| | | | | | This is in preparation for exposing this via an avoption. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Add an option for not sending RTCP packetsMartin Storsjö2012-02-23
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Add an error messageMartin Storsjö2012-02-23
| | | | | | Also return a proper error code. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Allow packetizing H263 according to the old RFC 2190Martin Storsjö2012-02-23
| | | | | | | | | | | | | | | | | | According to newer RFCs, this packetization scheme should only be used for interfacing with legacy systems. Implementing this packetization mode properly requires parsing the full H263 bitstream to find macroblock boundaries (and knowing their macroblock and gob numbers and motion vector predictors). This implementation tries to look for GOB headers (which can be inserted by using -ps <small number>), but if the GOBs aren't small enough to fit into the MTU, the packetizer blindly splits packets at any offset and claims it to be a GOB boundary (by using Mode A from the RFC). While not correct, this seems to work with some receivers. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Move the trailing comma into FF_RTP_FLAG_OPTSMartin Storsjö2012-02-23
| | | | | | This simplifies adding more flags to the macro. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: set channel layout for AC-3 streams based on the 'dac3' atom infoJustin Ruggles2012-02-22
| | | | fixes Bug 225
* img2: split muxer and demuxer into separate filesPaul B Mahol2012-02-22
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* rm: prevent infinite loops for index parsing.Ronald S. Bultje2012-02-22
| | | | | | | | | Specifically, prevent jumping back in the file for the next index, since this can lead to infinite loops where we jump between indexes referring to each other, and don't read indexes that don't fit in the file. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* mov: Add more HDV and XDCAM FourCCs.Alex Converse2012-02-22
| | | | Reference: VLC
* lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().Anton Khirnov2012-02-22
| | | | | | | | | | | It is not supposed to be done outside lavc. This is basically a revert of 818062f2f346df30f4ec0c0c1f54e8025cc3a80a. It is unclear what issue this was supposed to fix, if it reappears again it will have to be fixed in a more proper place. The wtv-demux test change is because the sample starts with a B-frame.
* rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.Ronald S. Bultje2012-02-22
| | | | | | | | | We read sub_packet_h / 2 packets per line of data (during deinterleaving), which equals zero if sub_packet_h <= 1, thus causing us to not read any data, leading to an infinite loop. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* cdxl: correctly synchronize video timestamps to audioPaul B Mahol2012-02-22
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* movenc: Buffer the mdat for the initial moov fragment, tooMartin Storsjö2012-02-22
| | | | | | | | | | | | This allows writing QuickTime-compatible fragmented mp4 (with a non-empty moov atom) to a non-seekable output. This buffers the mdat for the initial fragment just as it does for all normal fragments, too. Previously, the resulting atom structure was mdat,moov, moof,mdat ..., while it now is moov,mdat, moof,mdat. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Ignore the index if the ignidx flag is setMartin Storsjö2012-02-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Fix indentationMartin Storsjö2012-02-22
| | | | | | Also split a long line. Signed-off-by: Martin Storsjö <martin@martin.st>
* movdec: Don't parse all fragments if ignidx is setMartin Storsjö2012-02-22
| | | | | | | | | | In nonseekable files, we already stop parsing the toplevel atoms after finding moov and one mdat. In large seekable files (or files that are seekable, but slowly, e.g. http), reading all the fragments at the start can take a considerable amount of time. This allows opting out from this behaviour. Signed-off-by: Martin Storsjö <martin@martin.st>
* movdec: Restart parsing root-level atoms at the right spotMartin Storsjö2012-02-22
| | | | | | | | | | | If parsing moov+mdat in a non-seekable file, we currently abort parsing directly after parsing the header of the mdat atom. If we want to continue parsing later (if looking to parse later fragments), we need to skip past the content of the mdat atom, otherwise we end up parsing the content of the mdat atom as root level atoms. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Add support for MPEG2 HDV 720p24 (hdv4)Alex Converse2012-02-21
|
* img2: Use ff_guess_image2_codec(filename) shorthand where appropriate.Diego Biurrun2012-02-21
|
* Mark mutable static data const where appropriate.Alex Converse2012-02-21
|
* gif: K&R formatting cosmeticsAneesh Dogra2012-02-21
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* movdec: Adjust keyframe flagging in fragmented filesMartin Storsjö2012-02-21
| | | | | | | | | | | | | | For video, mark the first sample in a trun which doesn't have the sample-is-non-sync-sample flag set as a keyframe. In particular, the "sample does not depend on other samples" flag isn't enough to make it a keyframe, since later frames still can reference frames prior to that one (the flag only says that that particular frame doesn't depend on other frames). This fixes bug 215. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec: add duration field to AVCodecParserContextJustin Ruggles2012-02-20
| | | | | This will allow parsers to export the duration of the current frame being output, if known, instead of using AVCodecContext.frame_size.
* hls: Reset the AVIOContext when seekingMartin Storsjö2012-02-20
| | | | | | | | This avoids reading any old data in the AVIOContext buffer after the seek, and indicates to the mpegts demuxer that we've seeked, avoiding continuity check errors. Signed-off-by: Martin Storsjö <martin@martin.st>
* applehttp: Do seeking within segments, tooPanagiotis H.M. Issaris2012-02-19
| | | | | | | | | | | Enhance seeking by demuxing until the requested timestamp is reached within the segment selected by the seek code using the playlist info. Some mpegts streams don't have dts set for all packets though, this seeking method doesn't work well for that case. Signed-off-by: Martin Storsjö <martin@martin.st>
* doxy: remove reference to removed apiLuca Barbato2012-02-19
|
* examples: unbreak compilationLuca Barbato2012-02-19
| | | | Update api so it will compile again.
* mov: Use defines for sample flags in fragmentsMartin Storsjö2012-02-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Use defines for trun flagsMartin Storsjö2012-02-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Use defines for tfhd flagsMartin Storsjö2012-02-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* asf: prevent packet_size_left from going negative if hdrlen > pktlen.Ronald S. Bultje2012-02-18
| | | | | | | | This prevents failed assertions further down in the packet processing where we require non-negative values for packet_size_left. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* rtpdec: Identify incorrectly signalled H263Martin Storsjö2012-02-18
| | | | | | | | | | | | | H263 in RTP can be packetized in two formats (RFC 2190, RFC 2429/4629). The former normally uses the static payload type 34, while the latter normally uses dynamic payload types with the SDP format names H263-1998 or H263-2000. Look for packets that don't look like proper RFC 2190 packets and switch to depacketizing them according to the new format if they match some heuristic criteria. Signed-off-by: Martin Storsjö <martin@martin.st>
* aiff: don't skip block_align==0 check on COMM-after-SSND files.Ronald S. Bultje2012-02-17
| | | | | | | This prevents SIGFPEs when using block_align for divisions. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* movenc: Write the unknown duration as 64 bit fields in ismvMartin Storsjö2012-02-18
| | | | | | | This is required for the files to play back properly in windows media player. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Write track durations with all bits set if duration is unknownMartin Storsjö2012-02-18
| | | | | | | | According to 14496-12, the duration should be all 1s if the duration is unknown. This is the case if writing a moov atom without any samples described in it (e.g. as in ismv files). Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec: add a Sun Rasterfile encoderAneesh Dogra2012-02-17
| | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* cdxl: fix audio for some samplesPaul B Mahol2012-02-17
| | | | | | | There may be extra padding at and of chunk. Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* apetag: add proper support for binary tagsPaul B Mahol2012-02-17
| | | | | | | export as attachment streams Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* movenc: Don't set a default sample duration when creating ismvMartin Storsjö2012-02-16
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Factorize the check for distinguishing RTCP packets from RTPMartin Storsjö2012-02-16
| | | | | | The binary doesn't change after this patch. Signed-off-by: Martin Storsjö <martin@martin.st>
* bethsoftvid: synchronize video timestamps with audio sample rateJustin Ruggles2012-02-16
| | | | | | | | According to unofficial documentation, the video rate is locked to the audio sample rate. This results in proper synchronization of audio and video timestamps from the demuxer. This only works if the first audio packet occurs before the first video packet or the audio sample rate is the default rate of 11111 Hz, both of which are true for all samples in our archive.