Commit Graph

63 Commits

Author SHA1 Message Date
diego e085bc8dcf Add explicit location for headers from the stream/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 18:36:36 +00:00
reimar ec62af965e Check for eof in loop searching for data chunk.
Fixes bug #775.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22604 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 10:38:51 +00:00
reimar e1b26346cc Fix wrong setting of samplesize (must be bytes per sample, not bits)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22437 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-04 12:43:55 +00:00
reimar 8fdb1522a2 Do not read beyond end of data chunk if chunk_size is set.
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
2007-02-04 09:33:57 +00:00
reimar 7ac56b70b8 doxify a comment
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21667 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-18 15:15:21 +00:00
reimar 9526342555 Require 12 consecutive MPEG-audio headers before detecting as audio.
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
2006-12-18 15:14:23 +00:00
reimar 08bea9d14d Try playing files with wrong wav header length, fixes riff_broken_hrdlen.wav
(bug #238)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20340 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-21 19:58:49 +00:00
reynaldo 32492483c0 drops casts from void * on malloc/calloc from libmpdemux code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19067 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-13 16:41:13 +00:00
uau 6723323303 Clean up audio pts handling, make audio pts tracking in the audio-only
case work the same as with video.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18713 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-06-14 19:48:54 +00:00
uau 7022f65d0c Change free_sh_audio() to take demuxer and stream id as parameters
(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
2006-06-14 14:05:59 +00:00
reynaldo c03b175452 Part3 of Otvos Attila's oattila AT chello-hu mp_msg changes, with lots of modifications as usual
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18177 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-22 05:12:10 +00:00
reimar 1e390288ed Use ULL for > 32 bits constant.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18118 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-16 13:45:21 +00:00
reimar 827ccaa941 try to detect flac bitrate early on to avoid division by zero problems.
Should also help with mencoder and -oac copy


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18076 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-11 10:46:52 +00:00
reimar b72ebc6fb8 check wav header length against upper limit, should protect against
some misdetections (esp. with text files).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18075 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-11 10:43:20 +00:00
diego a33158d60d Convert printfs in aviprint.c to mp_msg and give the information printing
functions in this file a verbosity_level parameter.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17978 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-27 17:25:41 +00:00
diego eebf08b978 Convert all if(verbose>X) to mp_msg_test calls.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17933 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-24 08:12:03 +00:00
aurel 88901c08d4 retrieve metadata from FLAC files (patch by Benjamin Zores < ben _at_ geexbox.org >)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17899 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-20 20:06:04 +00:00
reimar 0b48e15140 fix leak on read error (forgot to free demux packet)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17791 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-09 22:14:34 +00:00
reimar 425573eb0d "i < sizeof(buf)" must be "i < sizeof(buf) - 5", since later buf[i + 5] is used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17776 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-08 13:07:36 +00:00
corey 1ab575101a Second-try commit of this patch.
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
2006-02-17 01:57:41 +00:00
reimar ceeff576d3 read data in nBlockAlign aligned chunks
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17555 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-02-07 22:12:34 +00:00
diego 36e1974be0 Unify include path handling, -I.. is in CFLAGS.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17013 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-11-18 14:39:25 +00:00
reimar 2912984517 move resync_audio_stream after seeking to demuxer.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16878 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-10-30 09:19:05 +00:00
reimar 2d6059c4e5 Fix seeking in wav files: align relative to start of data, not start of file
and use nBlockAlign if available.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16819 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-10-20 15:15:53 +00:00
reimar 021f63cd71 Ignore movi_end (except on error) to allow playing growing files.
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
2005-09-09 20:05:42 +00:00
ods15 d620029e4b Make -identify's 'ID_LENGTH=' print a float and not an integer.. The
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
2005-09-02 08:32:32 +00:00
rtognimp cd68e1618b Demuxer modularization
Demuxer selection by name with -demuxer command (bakward compatible)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16176 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-08-05 19:57:47 +00:00
reimar 1da3dc91bd set i_bps in demux_audio for WAV and MP3 to avoid division by zero before
decoder sets it.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16163 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-08-01 18:36:50 +00:00
reimar 5a5d4c946e Fix MP3 detection (list of found MP3 headers was not kep sorted).
Also remove code that only fixed the symptoms.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15216 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-04-18 20:51:34 +00:00
rfelker 5528785463 nico partially fixed the bug i reported; here's the rest of the fix.
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
2005-04-17 17:17:52 +00:00
nicodvb 4593e0f2cf skip framelen-4 bytes after having successfully detected an mpeg audio frame
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15205 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-04-17 17:08:55 +00:00
nicodvb aa8b3279f9 assign correct tag, dwScale and dwBlockAlign to mpeg audio; optionally 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
2005-04-17 09:42:51 +00:00
rfelker 47c016bd18 100l to reimar.. sh_audio->samplerate and sh_audio->i_bps are not the same
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14911 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-03-04 01:53:55 +00:00
reimar 78dda735d5 Fix possible hang when playing broken MP3 from linear stream and remove
duplicate code.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14609 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-29 12:55:56 +00:00
reimar f4c7dfd482 better, tuneable (via #define) MP3 detection, limit demux_audio to scanning
only the first 30000 bytes for headers.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13504 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-09-28 17:05:44 +00:00
reimar 6068c1846e moved sh_audio initialization from dec_audio to demuxer.c to fix
-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
2004-09-16 19:51:13 +00:00
rfelker 3f4d87d795 fix seeking with -hr-mp3-seek. maybe not the best fix (why is last_pts
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
2004-09-05 22:10:59 +00:00
rtognimp 9c48cc012a DTS support via lavc and libdts
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
2004-08-12 12:36:08 +00:00
rtognimp 2e8a397fad 10l to me: writing outside allocated memory
Patch by Mikulas Patocka < mikulas (at) artax (dot) karlin (dot) mff
(dot) cuni (dot) cz>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12214 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-04-15 20:48:27 +00:00
lumag 1e880aa659 FLAC decoding support via imported libmpflac.
TODO: fix FLAC-in-ogg decoding.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11005 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-10-04 22:00:25 +00:00
lumag 175884718b Fixed 'reading after EOF'. demuxers didn't check, how many they've read!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10892 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-09-20 12:50:25 +00:00
faust3 57e119d8be get_percent_pos support in demux_audio, patch by ROSEN Jeremy <jeremy.rosen at c-s.fr>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10883 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-09-19 19:40:46 +00:00
rfelker 0473f386a4 don't set audio pts to infinity after seeking in mp3 files :)
(10l)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10245 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-06-04 10:52:58 +00:00
rtognimp e7b942ecb1 Warning fix, patch by Dominik Mierzejewsky
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9656 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-03-22 20:15:03 +00:00
rtognimp 8e793a9998 10l cbSize not inited for l=16.\n Could give problem in print_wave_header
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9617 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-03-17 20:38:23 +00:00
rtognimp c95b78ac8d Same behaviour as old code for short headers
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9597 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-03-15 19:40:52 +00:00
rtognimp cde570e129 Read extradata for wav files, based on patch by <dimakar(at)yahoo.com>. Required for truespeech files.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9592 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-03-15 14:12:22 +00:00
arpi 6624dcbec4 fixed mp3 seeking near end of file
patch by ??? (sorry i can't find that mail)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8360 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-12-04 23:51:44 +00:00
arpi f859d013a8 *HUGE* set of compiler warning fixes, unused variables removal
based on patch by Dominik Mierzejewski <dominik@rangers.eu.org>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8124 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-11-06 23:54:29 +00:00
rfelker a6b8c576fd skip id3v2 junk when looking for mp3
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8117 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-11-05 23:28:52 +00:00