aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux/demux_audio.c
Commit message (Collapse)AuthorAge
* 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
* "i < sizeof(buf)" must be "i < sizeof(buf) - 5", since later buf[i + 5] is used.Gravatar reimar2006-03-08
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17776 b3059339-0415-0410-9bf9-f77b7e298cf2
* Second-try commit of this patch.Gravatar corey2006-02-17
| | | | | | | | | | | | 1. Include audio_delay as an argument to demux_seek. 2. Modify demux_seek_avi to adjust the audio/video stream positions so that mplayer/mencoder will instantly be in sync even when -delay is specified. I've quadruple checked this time; hopefully I haven't missed anything. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17637 b3059339-0415-0410-9bf9-f77b7e298cf2
* read data in nBlockAlign aligned chunksGravatar reimar2006-02-07
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17555 b3059339-0415-0410-9bf9-f77b7e298cf2
* Unify include path handling, -I.. is in CFLAGS.Gravatar diego2005-11-18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17013 b3059339-0415-0410-9bf9-f77b7e298cf2
* move resync_audio_stream after seeking to demuxer.cGravatar reimar2005-10-30
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16878 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix seeking in wav files: align relative to start of data, not start of fileGravatar reimar2005-10-20
| | | | | | | and use nBlockAlign if available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16819 b3059339-0415-0410-9bf9-f77b7e298cf2
* Ignore movi_end (except on error) to allow playing growing files.Gravatar reimar2005-09-09
| | | | | | | | Also adds a check if stream_read read the requested length. This and the movi_end check on error help not accidently playing ID3 tags. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16439 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make -identify's 'ID_LENGTH=' print a float and not an integer.. TheGravatar ods152005-09-02
| | | | | | | | accuracey may be totally fake for some demuxers (mpg), but accurate for others.. (avi) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16347 b3059339-0415-0410-9bf9-f77b7e298cf2
* Demuxer modularizationGravatar rtognimp2005-08-05
| | | | | | | Demuxer selection by name with -demuxer command (bakward compatible) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16176 b3059339-0415-0410-9bf9-f77b7e298cf2
* set i_bps in demux_audio for WAV and MP3 to avoid division by zero beforeGravatar reimar2005-08-01
| | | | | | | decoder sets it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16163 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix MP3 detection (list of found MP3 headers was not kep sorted).Gravatar reimar2005-04-18
| | | | | | | Also remove code that only fixed the symptoms. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15216 b3059339-0415-0410-9bf9-f77b7e298cf2
* nico partially fixed the bug i reported; here's the rest of the fix.Gravatar rfelker2005-04-17
| | | | | | | | | | | | basically demux_audio was mixing data in its header buffer in a bogus manner, whereby it could sometimes "make up" valid mpeg headers where no such header actually occurred in the file. it should be correct now. btw these changes also fix the bug where mplayer reports huge initial cpu usage for sound when playing mp3 files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15206 b3059339-0415-0410-9bf9-f77b7e298cf2
* skip framelen-4 bytes after having successfully detected an mpeg audio frameGravatar nicodvb2005-04-17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15205 b3059339-0415-0410-9bf9-f77b7e298cf2
* assign correct tag, dwScale and dwBlockAlign to mpeg audio; optionally ↵Gravatar nicodvb2005-04-17
| | | | | | assign layer and samples_per_frame when parsing mpa header git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15200 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l to reimar.. sh_audio->samplerate and sh_audio->i_bps are not the sameGravatar rfelker2005-03-04
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14911 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix possible hang when playing broken MP3 from linear stream and removeGravatar reimar2005-01-29
| | | | | | | duplicate code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14609 b3059339-0415-0410-9bf9-f77b7e298cf2
* better, tuneable (via #define) MP3 detection, limit demux_audio to scanningGravatar reimar2004-09-28
| | | | | | | only the first 30000 bytes for headers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13504 b3059339-0415-0410-9bf9-f77b7e298cf2
* moved sh_audio initialization from dec_audio to demuxer.c to fixGravatar reimar2004-09-16
| | | | | | | | -hr-mp3-seek bug (pts was -inf after seeking) and remove the workaround from demux_audio.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13358 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix seeking with -hr-mp3-seek. maybe not the best fix (why is last_ptsGravatar rfelker2004-09-05
| | | | | | | | | | | | | ever infinite?!?!) but at least it makes it work... :) patch by Balazs KOSSOVICS (tevefeju AT freemail.hu): Hi! When we listening music with "-hr-mp3-seek" option, than there is a negative value at the first rewinds in the statusrange (-52 hours, some minutes). The patch is against this. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13257 b3059339-0415-0410-9bf9-f77b7e298cf2
* DTS support via lavc and libdtsGravatar rtognimp2004-08-12
| | | | | | | | Patch by Aurelien Jacobs ( aurel at gnuage dot org ) dts in wav by me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13007 b3059339-0415-0410-9bf9-f77b7e298cf2