summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* rtpdec_h264: Return proper error codesMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Check the available data length before readingMartin Storsjö2012-05-05
| | | | | | This makes sure the length is checked for STAP-A type packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Add input size checksIvan Kovtunov2012-05-05
| | | | | | This fixes crashes if given too short data packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* ea: check chunk_size for validity.Ronald S. Bultje2012-05-04
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* cosmetics: indentationJustin Ruggles2012-05-03
|
* avformat: only fill-in interpolated timestamps if duration is non-zeroJustin Ruggles2012-05-03
| | | | | This avoids returning duplicate timestamps for multiple packets when the demuxer does not provide all timestamps and packet duration is not known.
* avformat: remove a workaround for broken timestampsJustin Ruggles2012-05-03
| | | | | | | This modifies pts in situations other than what was intended, leading to invalid timestamps. Reverts commit 90bb394dccacd10607153833a0aeba0d970dc8db
* mpegts: Some additional HDMV types and reg descriptors for mpegtsJoakim Plate2012-05-03
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* mkv: mark corrupted packets and return themLuca Barbato2012-04-29
| | | | Do return error if memory allocation or I/O fails.
* mkv: forward EMBL block data errorLuca Barbato2012-04-29
| | | | Do not return 0 on error.
* segment: reorder seg_write_header allocationLuca Barbato2012-04-27
| | | | | As pointed by Paul B Mahol <onemda@gmail.com> the previous code could lead to null pointer dereference.
* avio: make avio_close(NULL) a no-opLuca Barbato2012-04-27
| | | | Its behaviour in line with ffurl_close(NULL).
* mov: Parse EC3SpecificBox (dec3 atom).Yusuke Nakamura2012-04-27
| | | | | | | | Skip to parse fields for additional independent substreams and its associated dependent substreams since libavcodec's E-AC-3 decoder does not support them yet. Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* mpegts: Make sure we don't return uninitialized packetsMartin Storsjö2012-04-27
| | | | | | | | | This fixes crashes, where the demuxer could return 0 even if the returned AVPacket isn't initialized at all. This could happen if running into EOF or running out of probesize with non-seekable sources. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: support eac3 audioHendrik Leppkes2012-04-25
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avf: fix faulty check in has_durationLuca Barbato2012-04-25
| | | | An invalid duration is AV_NOPTS_VALUE not 0.
* isom: Support more DTS codec identifiers.Yusuke Nakamura2012-04-23
| | | | | | DTS LBR identifier ('dtse') is not included since libavcodec doesn't support it yet. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* matroska: Clear prev_pkt between seeks.Dale Curtis2012-04-23
| | | | | | | | | | | The new incremental parser doesn't always clear prev_pkt, however the packet queue is cleared when seeking. Which leads to a use-after-free. Verified using Valgrind. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* audemux: Add a sanity check for the number of channelsMichael Niedermayer2012-04-23
| | | | | | | Fixes a division by 0. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Martin Storsjö <martin@martin.st>
* matroska: Add incremental parsing of clusters.Dale Curtis2012-04-22
| | | | | | | | | | | | | | | | | | | | | | Reduces the amount of upfront data required for cluster parsing thus decreasing latency on seek and startup. The change in the seek-lavf_mkv FATE test is due to incremental parsing no longer reading as much data as the old parser and thus not having that additional data to generate index entries based on keyframes. Index entries are added correctly as the file is parsed. All FATE tests pass and Chrome has been using this patch for ~6 months without issue. Currently incremental parsing is not supported for files with SSA tracks since they require merging packets between clusters. In this case the code falls back to non-incremental parsing. Signed-off-by: Aaron Colwell <acolwell@chromium.org> Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mpegts: Try seeking back even for nonseekable protocolsMartin Storsjö2012-04-23
| | | | | | | | | | | | | | | | | The mpegts demuxer reads 5 KB at startup just for discovering the packet size. Since the default avio buffer size is 32 KB, the seek back to the start will in most cases be within the avio buffer, and will in most cases succeed even if the actual protocol isn't seekable. This makes the demuxer startup faster/with less data when reading data from a non-seekable input, by not skipping the first few KB. If it fails, don't warn if the protocol isn't seekable, making it behave as before in the failure case. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Treat keyframe indexes as 1-origin if starting at non-zero.Yusuke Nakamura2012-04-21
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* mov: Take stps entries into consideration also about key_off.Yusuke Nakamura2012-04-21
| | | | | | Splitted files don't start always from a sync sample. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* movenc: Support high sample rates in isomedia formats by setting the sample ↵Alex Converse2012-04-20
| | | | | | rate field in stsd to 0. Libisomediafile appears to always set this field to zero.
* avcodec: add a cook parser to get subpacket durationJustin Ruggles2012-04-20
| | | | Fixes jittery video playback of rm files with cook audio.
* avio: make AVIOContext.av_class pointer to constMans Rullgard2012-04-18
| | | | | | | | | | Fix this warning: libavformat/aviobuf.c:663:20: warning: assignment discards qualifiers from pointer target type Although this is a public header, it should remain source and binary compatible. Signed-off-by: Mans Rullgard <mans@mansr.com>
* nutdec: add malloc check and fix const to non-const conversion warningsMans Rullgard2012-04-18
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* matroska: do not set invalid default duration if frame rate is zeroMans Rullgard2012-04-18
| | | | | | | | | If a video track specifies a zero frame rate (invalid but occurs), this results in a division by zero and subsequent undefined conversion to integer. Setting the default duration from the frame rate only if the latter is greater than zero avoids such problems. Signed-off-by: Mans Rullgard <mans@mansr.com>
* mkv: use av_reduce instead of av_d2q for framerate estimationLuca Barbato2012-04-17
| | | | It avoids some rounding errors.
* mkv: report average framerate as minimal as wellLuca Barbato2012-04-17
| | | | | This is in line with other demuxers and overall seems more correct than assuming codec time base.
* riff: use bps instead of bits_per_coded_sample in the WAVEFORMATEXTENSIBLE ↵Justin Ruggles2012-04-17
| | | | | | | header This matches the value for the plain WAVEFORMATEX header. Also fixes stream copy to WAVE for non-16-bit raw pcm.
* rtmp: Support 'rtmp_playpath', an option which overrides the stream identifierSamuel Pitoiset2012-04-16
| | | | | | | | | This option is the stream identifier to play or to publish. Sometimes the URL parser cannot determine the correct playpath automatically, so it must be given explicitly using this option (ie. -rtmp_playpath). Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Support 'rtmp_app', an option which overrides the name of applicationSamuel Pitoiset2012-04-16
| | | | | | | | This option is the name of application to connect on the RTMP server. Sometimes the URL parser cannot determine the app name automatically, so it must be given explicitly using this option (ie. -rtmp_app). Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: free memory on header parsing failureDale Curtis2012-04-14
| | | | | | Call mov_read_close when mov_read_header fails. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: fix leaking memory with multiple drefs.Dale Curtis2012-04-14
| | | | | | | | | Instead of allocating over the original, free first. MOVStreamContext is zero initialized so no double free will occur. Same style as other fixes for the same problem in this file. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: Fix detecting there is no sync sample.Yusuke Nakamura2012-04-13
| | | | | | Stss atom without entries doesn't mean every sample is a sync sample. Signed-off-by: Martin Storsjö <martin@martin.st>
* avf: has_duration does not check the global oneLuca Barbato2012-04-13
| | | | | Some container formats report a global duration, but not a per stream one.
* matroska: Fix leaking memory allocated for laces.Dale Curtis2012-04-12
| | | | | | | | | | During error conditions matroska_parse_block may exit without freeing the memory allocated for laces. Found via valgrind: http://pastebin.com/E54k8QFU Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* movenc: Remove a dead initializationAlex Converse2012-04-12
|
* avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmeticsDiego Biurrun2012-04-12
|
* movenc: small refactor mov_write_packetLuca Barbato2012-04-11
| | | | | | | | | | Share the formerly internal write_packet with the hinter and move the fragment flush logic to the user facing one since it is not concerned about movtrack-only streams. Fixes bug #263 Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: remove redundant checkLuca Barbato2012-04-11
| | | | | | The proper check is already in mov_write_header. Signed-off-by: Martin Storsjö <martin@martin.st>
* Drop some pointless #ifdefs.Diego Biurrun2012-04-10
| | | | The files are only compiled if the #ifdef conditions are met.
* nutdec: K&R formatting cosmeticsAsen Lekov2012-04-10
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* rtsp: Don't use av_malloc(0) if there are no streamsMartin Storsjö2012-04-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Don't use uninitialized data if there are no streamsMartin Storsjö2012-04-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: Fix indentationMartin Storsjö2012-04-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Don't expose the MS-RTSP RTX data stream to the callerMartin Storsjö2012-04-08
| | | | | | | | This avoids exposing a dummy AVStream which won't get any data and which will make avformat_find_stream_info wait for info about this stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_asf: Set the no_resync_search option for the chained asf demuxerMartin Storsjö2012-04-07
| | | | | | | | | | Searching for packet markers doesn't make sense for this use case, where packets are fed one at a time to the demuxer. This fixes playing back streams that have packets not starting with the 0x82, 0x00, 0x00 marker. Signed-off-by: Martin Storsjö <martin@martin.st>
* asfdec: Add an option for not searching for the packet markersMartin Storsjö2012-04-07
| | | | | | Some streams don't contain these. Signed-off-by: Martin Storsjö <martin@martin.st>