summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_audio.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.diego2007-03-151-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check for eof in loop searching for data chunk.reimar2007-03-151-1/+1
| | | | | | | Fixes bug #775. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22604 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix wrong setting of samplesize (must be bytes per sample, not bits)reimar2007-03-041-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22437 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not read beyond end of data chunk if chunk_size is set.reimar2007-02-041-1/+6
| | | | | | | Sample: http://samples.mplayerhq.hu/A-codecs/wavpcm/ahh.wav git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22121 b3059339-0415-0410-9bf9-f77b7e298cf2
* doxify a commentreimar2006-12-181-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21667 b3059339-0415-0410-9bf9-f77b7e298cf2
* Require 12 consecutive MPEG-audio headers before detecting as audio.reimar2006-12-181-1/+1
| | | | | | | Fixes misdetection of http://samples.mplayerhq.hu/FLV/flv_misdetected_as_mpa git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21666 b3059339-0415-0410-9bf9-f77b7e298cf2
* Try playing files with wrong wav header length, fixes riff_broken_hrdlen.wavreimar2006-10-211-4/+2
| | | | | | | (bug #238) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20340 b3059339-0415-0410-9bf9-f77b7e298cf2
* drops casts from void * on malloc/calloc from libmpdemux codereynaldo2006-07-131-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19067 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clean up audio pts handling, make audio pts tracking in the audio-onlyuau2006-06-141-6/+1
| | | | | | | case work the same as with video. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18713 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change free_sh_audio() to take demuxer and stream id as parametersuau2006-06-141-3/+2
| | | | | | | | | | | | | | (same as new_sh_audio()) instead of sh_audio_t *, use those to remove the pointer from demuxer->a_streams[] before freeing it. Some demuxers use free_sh_audio() to undo the creation of an already-allocated audio stream in case of error. These uses were unsafe since free_sh_audio() freed the data structure but left the pointer in demuxer->a_streams[], leading to double free later in free_demuxer() (and perhaps use of the freed stream before that, I didn't check). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18711 b3059339-0415-0410-9bf9-f77b7e298cf2
* Part3 of Otvos Attila's oattila AT chello-hu mp_msg changes, with lots of ↵reynaldo2006-04-221-1/+2
| | | | | | modifications as usual git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18177 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use ULL for > 32 bits constant.reimar2006-04-161-1/+1