aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux/demux_audio.c
Commit message (Collapse)AuthorAge
* Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too manyGravatar reimar2009-11-22
| | | | | | | 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
* Get rid of useless indirection and use the demuxer argument directly instead ofGravatar reimar2009-09-14
| | | | | | | | | 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.Gravatar diego2009-05-13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add standard license header to all files in libmpdemux.Gravatar diego2009-05-08
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of pointless 'extern' keywords.Gravatar diego2008-12-03
| | | | 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.Gravatar reimar2008-11-16
| | | | | | | 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).Gravatar cehoyos2008-10-09
| | | | 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)Gravatar ptt2008-07-29
| | | | 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 idempotentGravatar reimar2008-07-13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27275 b3059339-0415-0410-9bf9-f77b7e298cf2
* Correct stream-seekability tests in demux_audio and demux_lavfGravatar reimar2008-07-11
| | | | | | | 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.Gravatar reimar2008-07-10
| | | | 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.Gravatar reimar2008-07-10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27248 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: reindentGravatar reimar2008-07-10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27247 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clean up reading of wav extradata.Gravatar reimar2008-07-10
| | | | | | | 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.Gravatar reimar2008-06-29
| | | | | | | 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.Gravatar reimar2008-05-21
| | | | | | | 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 functionGravatar reimar2008-04-12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26408 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify: use AV_RB24Gravatar reimar2008-04-12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26407 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless checksGravatar reimar2008-04-12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26406 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify (currently disabled) get_flac_metadataGravatar reimar2008-04-12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26405 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a comment to the #if 0Gravatar reimar2008-01-29
| | | | 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.Gravatar reimar2008-01-29
| | | | | | | | 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.Gravatar reimar2008-01-29
| | | | 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.Gravatar reimar2008-01-29
| | | | | | | | 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.Gravatar reimar2008-01-19
| | | | 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.Gravatar reimar2008-01-19
| | | | 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 .rodataGravatar reimar2008-01-13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify: initialize at declaration at the start of the functionGravatar reimar2007-09-24
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24612 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of rather pointless assertsGravatar reimar2007-09-24
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24611 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_audio.c: Fix timestamp handlingGravatar uau2007-09-24
| | | | | | | | | | | | | | | | | | 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 * arithmeticGravatar reimar2007-06-24
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23648 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_RL32Gravatar reimar2007-06-24
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23647 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explicit location for headers from the stream/ directory.Gravatar diego2007-03-15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check for eof in loop searching for data chunk.Gravatar reimar2007-03-15
| | | | | | | 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)Gravatar reimar2007-03-04
| | | | 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.Gravatar reimar2007-02-04
| | | | | | | 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 commentGravatar reimar2006-12-18
| | | | 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.Gravatar reimar2006-12-18
| | | | | | | 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.wavGravatar reimar2006-10-21
| | | | | | | (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 codeGravatar reynaldo2006-07-13
| | | | 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-onlyGravatar uau2006-06-14
| | | | | | | 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 parametersGravatar uau2006-06-14
| | | | | | | | | | | | | | (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 ↵Gravatar reynaldo2006-04-22
| | | | | | modifications as usual git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18177 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use ULL for > 32 bits constant.Gravatar reimar2006-04-16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18118 b3059339-0415-0410-9bf9-f77b7e298cf2
* try to detect flac bitrate early on to avoid division by zero problems.Gravatar reimar2006-04-11
| | | | | | | Should also help with mencoder and -oac copy git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18076 b3059339-0415-0410-9bf9-f77b7e298cf2
* check wav header length against upper limit, should protect againstGravatar reimar2006-04-11
| | | | | | | some misdetections (esp. with text files). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18075 b3059339-0415-0410-9bf9-f77b7e298cf2
* Convert printfs in aviprint.c to mp_msg and give the information printingGravatar diego2006-03-27
| | | | | | | functions in this file a verbosity_level parameter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17978 b3059339-0415-0410-9bf9-f77b7e298cf2
* Convert all if(verbose>X) to mp_msg_test calls.Gravatar diego2006-03-24
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17933 b3059339-0415-0410-9bf9-f77b7e298cf2
* retrieve metadata from FLAC files (patch by Benjamin Zores < ben _at_ ↵Gravatar aurel2006-03-20
| | | | | | geexbox.org >) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17899 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix leak on read error (forgot to free demux packet)Gravatar reimar2006-03-09
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17791 b3059339-0415-0410-9bf9-f77b7e298cf2