summaryrefslogtreecommitdiff
path: root/libavformat/asfdec.c
Commit message (Collapse)AuthorAgeFilesLines
* asfdec: Add an option for not searching for the packet markersMartin Storsjö2012-04-071-1/+20
| | | | | | Some streams don't contain these. Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-061-1/+1
| | | | | | | Also add missing trailing commas, break long codec_tag lines and add spaces in codec_tag declarations. Signed-off-by: Martin Storsjö <martin@martin.st>
* asf: only set index_read if the index contained entries.Ronald S. Bultje2012-03-281-1/+1
| | | | | This allows falling back to a binary search if the file contains no index, thus fixing seeking in such files (e.g. luckynight.wma).
* asf: reset side data elements on packet copy.Ronald S. Bultje2012-03-221-0/+2
| | | | | | | Prevents crash (double free) when free()ing the original packet. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* asfdec: Do not set AVCodecContext.frame_sizeJustin Ruggles2012-02-291-20/+0
|
* asf: don't seek back on EOF.Ronald S. Bultje2012-02-281-1/+1
| | | | | | | | | Seeking back on EOF will reset the EOF flag, causing us to re-enter the loop to find the next marker in the ASF file, thus potentially causing an infinite loop. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* asf: error out on ridiculously large minpktsize values.Ronald S. Bultje2012-02-281-1/+5
| | | | | | | They cause various issues further down in demuxing. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* asf: prevent packet_size_left from going negative if hdrlen > pktlen.Ronald S. Bultje2012-02-181-0/+7
| | | | | | | | 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
* Move some conditionally used variables into the block where they are used.Diego Biurrun2012-02-131-1/+1
| | | | This allows dropping the av_unused argument from them.
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-271-1/+1
|
* asfdec: add side data to ASFStream packet instead of output packet.Justin Ruggles2011-12-211-1/+1
| | | | fixes memleak of side data
* asf: use packet dts as approximation of ptsJohn Stebbins2011-12-021-1/+1
| | | | | | Having a somehow off seeking is better than having none at all. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* asf: do not call av_read_frameLuca Barbato2011-12-021-1/+1
| | | | The asf_read_pts should read the bitstream directly.
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-301-1/+2
| | | | It's supposed to be called only from (de)muxers.
* Replace ffmpeg references with more accurate libav* references.Diego Biurrun2011-11-021-1/+1
|
* lavf: make some seeking functions privateAnton Khirnov2011-10-281-1/+1
| | | | | | | Specifically av_update_cur_dts(), av_seek_frame_binary() and av_gen_search(). They are not supposed to be called outside lavf.
* lavf: use avpriv_ prefix for ff_new_chapter().Anton Khirnov2011-10-201-1/+1
| | | | It's used in libavdevice.
* lavf,lavd: replace av_new_stream->avformat_new_stream part I.Anton Khirnov2011-10-191-1/+1
| | | | | Trivial replacements with sed are done in this commit: sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
* lavf: use designated initialisers for all (de)muxers.Anton Khirnov2011-07-171-9/+9
| | | | It's more readable and less prone to breakage.
* Do not include mathematics.h in avutil.hMans Rullgard2011-07-031-0/+1
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove return statements following infinite loops without breakMans Rullgard2011-07-031-2/+0
| | | | | | | These statements cannot be reached and are thus not needed. This removes a number of compiler warnings. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Move some conditionally used code below the appropriate #ifdef.Diego Biurrun2011-07-031-3/+1
|
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-081-2/+3
|
* Remove unused variablesMans Rullgard2011-06-021-11/+8
|
* asfdec: add missing #include for av_bswap32()Mans Rullgard2011-05-191-0/+1
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* asfdec: fix possible overread on broken files.Uoti Urpala2011-05-171-1/+4
|
* asfdec: do not fall back to binary/generic searchVladimir Pantelic2011-05-171-0/+1
| | | | | | | | | | asf_read_seek() inside the asf demuxer already does the right thing, it tries the index and if that fails it uses binary search. If binary search is called from outside of asfdec.c it will fail because the asf code cannot clean up after itself. Therefore introduce AVFMT_NOBINSEARCH that prevents the seek code to fallback to binary search and AVFMT_NOGENSEARCH that prevents the seek code to fallback to generic search.
* asfdec: reindent after previous commit c7bd5edVladimir Pantelic2011-05-171-7/+7
|
* asfdec: fallback to binary search internallyVladimir Pantelic2011-05-171-7/+8
| | | | lavf will do that anyway in case seek by index fails
* asfdec: fix assert failure on invalid filesUoti Urpala2011-05-031-0/+4
| | | | | | | | Add an extra size validity check in asf_read_frame_header(). Without this asf->packet_size_left may become negative, which triggers an assertion failure later. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* asfdec: fix parsing of packets that overrun into padding.Ronald S. Bultje2011-05-031-2/+8
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* asf: remove commented out code in asf_read_seekVladimir Pantelic2011-04-201-21/+0
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* asfdec: Remove dead code from asf_read_close().Diego Biurrun2011-04-181-5/+1
|
* make containers pass palette change in AVPacketKostya Shishkov2011-04-151-6/+15
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* handle malloc failures in ff_get_wav_headerMax Horn2011-04-141-1/+3
| | | | | | | | | | | ff_get_wav_header is reading data from a WAVE file and then uses it (without validation) to malloc a buffer. It then proceeded to read data into the buffer, without verifying that the allocation succeeded. To address this, change ff_get_wav_header to return an error if allocation failed, and adapted all calling code to handle that error. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avio: undeprecate av_url_read_fseek/fpause under nicer namesAnton Khirnov2011-04-121-1/+1
| | | | It seems their replacements won't be ready anytime soon.
* asfdec: remove a forgotten declaration of nonexistent functionAnton Khirnov2011-04-081-2/+0
|
* asfdec: also subtract preroll when reading simple index objectVladimir Pantelic2011-03-231-2/+2
| | | | | | | This was missed when ASF was changed to return timestamps without preroll. Signed-off-by: Mans Rullgard <mans@mansr.com>
* avio: make av_url_read_fseek/fpause internal.Anton Khirnov2011-03-211-1/+2
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* asfdec: subtract the preroll value and thus output 0 based timestampsVladimir Pantelic2011-03-171-1/+2
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes senseAnton Khirnov2011-03-161-18/+18
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: deprecate url_ferrorAnton Khirnov2011-03-151-1/+1
| | | | | | AVIOContext.error should be used directly instead. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: deprecate url_feofAnton Khirnov2011-03-071-6/+6
| | | | | | AVIOContext.eof_reached should be used directly instead. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: add avio_tell macro as a replacement for url_ftellAnton Khirnov2011-03-041-18/+18
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* lavf: replace all uses of url_fskip with avio_seekAnton Khirnov2011-03-011-15/+15
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefix for url_fseekAnton Khirnov2011-03-011-12/+12
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefixes for get_* functionsAnton Khirnov2011-02-211-127/+127
| | | | | | | | | | | | | | In the name of consistency: get_byte -> avio_r8 get_<type> -> avio_r<type> get_buffer -> avio_read get_partial_buffer will be made private later get_strz is left out becase I want to change it later to return something useful. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-201-14/+14
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* asfdec: fix build for big endian targetsMans Rullgard2011-02-131-0/+1
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>