summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_audio.c
Commit message (Collapse)AuthorAgeFilesLines
* libmpdemux: remove demux_real, demux_viv, demux_audiowm42012-08-201-830/+0
| | | | | | libavformat replaces demux_audio completely. I don't know/care what vivo (demux_viv) is. libavformat has a Real demuxer; it seems it works slightly better, with a different set of bugs.
* demux_audio: always enable parsing for audio streamsmplayer-svn2012-08-031-1/+2
| | | | | | | | | Generally enable parsing for audio streams. The formats I know of that do not need it (e.g. raw audio) do not have a parser anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35050 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: fix calculation of audio lengthmplayer-svn2012-08-031-1/+2
| | | | | | | | | Take start offset into account when calculating amount of audio data. Patch by Benoît Thébaudeau [benoit thebaudeau advansee com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34915 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: avoid integer overflowsmplayer-svn2012-08-031-3/+7
| | | | | | | | | Add some additional checks to ensure subtractions do not overflow. Patch by Benoît Thébaudeau [benoit thebaudeau advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34914 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: do not decode ID3v2 tag data as audio datamplayer-svn2012-08-031-10/+53
| | | | | | | | | | | | | | | | | Minor simplification. Part of patch by Benoît Thébaudeau [benoit thebaudeau () advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34718 b3059339-0415-0410-9bf9-f77b7e298cf2 Detect ID3v2 tag at the end of the file and stop demuxing before its start. Avoids trying to decode its data as MP3. Patch by Benoît Thébaudeau [benoit thebaudeau {} advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34719 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: improve WAV format detectionmplayer-svn2012-08-031-1/+3
| | | | | | | | Make WAV format detection more restrictive so it does not incorrectly grab qcp files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34343 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audo: fix wrong runtime and average bitrate for VBR MP3mplayer-svn2012-08-031-1/+67
| | | | | | | | | Do so by determining the number of frames from the Xing/Info/VBRI headers and by calculation a correct duration which leads to an reasonable average bytes per seconds. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34273 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ib
* demux_audio: ensure that demuxer->movi_end will be setmplayer-svn2012-08-031-3/+2
| | | | | | | This also simplifies the code that checks for TAG. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34272 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ib
* build: switch to libavutil bswap.h and intreadwrite.hUoti Urpala2012-02-011-5/+6
| | | | | | | | | | | | Remove the private bswap and intreadwrite.h implementations and use libavutil headers instead. Originally these headers weren't publicly installed by libavutil at all. That already changed in 2010, but the pure C bswap version in installed headers was very inefficient. That was recently (2011-12) improved and now using the public bswap version probably shouldn't cause noticeable performance problems, at least if using a new enough compiler.
* demux_audio: Do not generate nonsensical pts values for FLACreimar2010-12-161-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32678 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_audio: Set needs_parsing to 1 for DTS audioreimar2010-12-161-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32668 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_avi: Add WAVEFORMATEXTENSIBLE supportreimar2010-12-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32639 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_audio: fix WAVEFORMATEXTENSIBLE supportreimar2010-12-161-2/+2
| | | | | | | | | | Fix WAVEFORMATEXTENSIBLE support on big-endian. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32637 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix WAVEFORMATEXTENSIBLE condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32638 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio: FLAC: support new libavcodec parser, use lavf to demuxUoti Urpala2010-12-091-0/+1
| | | | | Parse FLAC data with new libavcodec parser if needed. Use libavformat demuxer for raw FLAC files by default.
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-141-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* options: move [no]hr-mp3-seek to option structClément Bœsch2010-11-111-3/+3
|
* cleanup: malloc+memset->calloc, sizeof(TYPE)->sizeof(*ptr)reimar2010-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32181 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32182 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32183 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace some sizeof(type) by sizeof(*pointer) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32184 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32186 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32187 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32188 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizoef(type) by sizeof(*ptrvar). Besides being consistent with FFmpeg style, this reduces the size of a patch to rename these types to not conflict with the windows.h definitions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32189 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32191 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32192 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(type) by sizeof(*ptrvar) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32193 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a useless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32194 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(type) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32195 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a useless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32196 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace several sizeof(WAVEFORMATEX) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32197 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace one more instance of sizeof(WAVEFORMATEX); fix compilation. patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32199 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid some pointless uses of sizeof() and one related cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32200 b3059339-0415-0410-9bf9-f77b7e298cf2 Merge one malloc() + memset() invocation into calloc(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32202 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32203 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(WAVEFORMATEX) occurrences. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32205 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32206 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(BITMAPINFOHEADER) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32207 b3059339-0415-0410-9bf9-f77b7e298cf2
* asfheader, demux_audio: Remove some pointless be2me/le2mereimar2010-11-021-6/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31685 b3059339-0415-0410-9bf9-f77b7e298cf2
* Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Merge svn changes up to r30732Uoti Urpala2010-03-101-0/+2
|\
| * Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in atack2010-02-221-0/+2
| | | | | | | | | | | | | | wave file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30709 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30643Uoti Urpala2010-03-101-2/+1
|\|
| * Add header for AVI print functions; avoids many forward declarations.diego2010-02-181-2/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30631 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29962Uoti Urpala2009-11-231-1/+1
|\|
| * Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too manyreimar2009-11-221-1/+1
| | | | | | | | | | | | | | name clashes, in particular with Windows headers (which define STREAM_SEEK as an enum type). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29962 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29684Uoti Urpala2009-09-161-2/+1
|\|
| * Get rid of useless indirection and use the demuxer argument directly instead ofreimar2009-09-141-2/+1
| | | | | | | | | | | | | | | | | | ds->demuxer. This makes it also work again with -audiofile without having to add more hacks to demux_demuxers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29677 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-9/+9
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Replace libavutil internal header #includes with MPlayer copiesUoti Urpala2009-07-261-1/+1
| | | | | | | | | | | | Change #include lines for libavutil/intreadwrite.h, libavutil/bswap.h and libavutil/x86_cpu.h to use the MPlayer file under ffmpeg_files/ instead.
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-9/+9
| |
* | Merge svn changes up to r29304Uoti Urpala2009-07-071-0/+17
|\|
| * Add standard license header to all files in libmpdemux.diego2009-05-081-0/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-1/+1
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-1/+1
|/ | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Get rid of pointless 'extern' keywords.diego2008-12-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use 64 bit numbers for file positions in the seek function in audio demuxer.reimar2008-11-161-1/+1
| | | | | | | Hopefully fixes seeking in wav files in-between 2 and 4 GB. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27938 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused line (and fix an icc warning).cehoyos2008-10-091-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27739 b3059339-0415-0410-9bf9-f77b7e298cf2
* changed 'Audio file' to 'Audio only' (to not get 'Audio file file' when played)ptt2008-07-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27365 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l, do not use macros on functions that are not idempotentreimar2008-07-131-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27275 b3059339-0415-0410-9bf9-f77b7e298cf2
* Correct stream-seekability tests in demux_audio and demux_lavfreimar2008-07-111-1/+1
| | | | | | | Based on a patch by Alexander Kanavin (alexander.kanavin nokia com) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27250 b3059339-0415-0410-9bf9-f77b7e298cf2
* Only read wav header cbSize when there is enough space in header.reimar2008-07-101-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27249 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l, assignment introduced in r27246 was exactly the wrong way around.reimar2008-07-101-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27248 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: reindentreimar2008-07-101-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27247 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clean up reading of wav extradata.reimar2008-07-101-7/+3
| | | | | | | Fixes bug #1135 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27246 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure we do not use uninitialized data in case of a short read.reimar2008-06-291-0/+1
| | | | | | | Not really relevant but fixes bug #1109 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27143 b3059339-0415-0410-9bf9-f77b7e298cf2
* Continue detection if it is not clear if we have a MP3 or flac file.reimar2008-05-211-1/+2
| | | | | | | Fixes http://samples.mplayerhq.hu/A-codecs/MP3/01%20-%20Charity%20Case.mp3 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26844 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove another two useless special-case from flac metadata reading functionreimar2008-04-121-20/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26408 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify: use AV_RB24reimar2008-04-121-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26407 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless checksreimar2008-04-121-8/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26406 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify (currently disabled) get_flac_metadatareimar2008-04-121-11/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26405 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a comment to the #if 0reimar2008-01-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25926 b3059339-0415-0410-9bf9-f77b7e298cf2
* Disable reading of flac metadata, mere metadata is not worth such a mess.reimar2008-01-291-1/+3
| | | | | | | | If you want this, fix the implementation to not crash at least occasionally, or wait till I get bored enough to fix it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25918 b3059339-0415-0410-9bf9-f77b7e298cf2
* Properly check length of flac metadata.reimar2008-01-291-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25917 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use defines to give names to the different seek flags.reimar2008-01-291-4/+4
| | | | | | | | A better solution should be considered later, esp. for the many broken demuxers that do not treat these flags correctly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25911 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix endless loop if nAvgBytesPerSec is 0.reimar2008-01-191-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25800 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid a division by 0 if i_bps is 0.reimar2008-01-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25799 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make all demuxer_desc_t const, thus moving them to .rodatareimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify: initialize at declaration at the start of the functionreimar2007-09-241-10/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24612 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of rather pointless assertsreimar2007-09-241-12/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24611 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_audio.c: Fix timestamp handlinguau2007-09-241-14/+15
| | | | | | | | | | | | | | | | | | The code calculated the pts values of audio packets by adding the length of the current packet to the pts of the previous one. The length of the previous packet should be added instead. This broke WAV timestamps near the end of the stream where a short packet occurs. Change the code to store the pts of the next packet instead of the last one. This fixes the WAV timestamps and allows some simplifications. MP3 timestamps are not affected as packets are always treated as constant decoded length, and FLAC timestamps still have worse problems (FLAC is treated as as if it was constant bitrate even though it isn't). Also store the timestamps as double instead of float. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24609 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of: useless variable, useless cast and void * arithmeticreimar2007-06-241-8/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23648 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_RL32reimar2007-06-241-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23647 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explicit location for headers from the stream/ directory.diego