Commit Graph

76 Commits

Author SHA1 Message Date
diego 835c654bb0 typo fix: inited --> initialized
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-14 14:23:55 +00:00
reimar d63fb8ba99 Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" with
an almost-trivial implementation.
This allows making the builtin codec structs const, and it also makes
clearer that this "selected" status is not used outside the init functions.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25689 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-12 14:05:46 +00:00
rfelker ae9db277c7 10l, len may change after initialization time
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25282 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-03 09:57:21 +00:00
rfelker 4bceedee93 fix declaration after statement, take 2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25281 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-03 09:07:31 +00:00
rfelker aef0374c1c fix declaration after statement
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25280 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-03 09:03:45 +00:00
reimar fb366fbf03 Simplify decode_audio function a bit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24989 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-08 18:14:49 +00:00
reimar c849b6683a Remove a check+abort, this case should never happen anyway, and if it does
the most likely result is a NULL dereference which isn't much worse.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24946 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-03 10:20:00 +00:00
uau 6338c068a2 Simplify init_audio_filters() arguments
Remove the following arguments as redundant: in_channels, in_format,
out_minsize, out_maxsize. The first two always equal fields of the
sh_audio_t struct given as the first argument to the function. The
last two are unused after the allocation of sh_audio->a_out_buffer
was changed to be done on demand.

After the out_minsize and out_maxsize arguments are removed the
function preinit_audio_filters() is identical to init_audio_filters(),
so remove it and use the latter instead.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24922 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:28 +00:00
uau 2d44426648 audio: simplify buffer allocation code
Remove the code allocating sh_audio->a_out_buffer from
init_audio_filters() and let the buffer be allocated by the new
dynamic allocation code.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24921 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:23 +00:00
uau 1844e1dd0c Change decode_audio() interface
Rewrite decode_audio to better deal with filters that handle input in
large blocks. It now always places output in sh_audio->a_out_buffer
(which was always given as a parameter before) and reallocates the
buffer if needed. After the changes filters can return arbitrarily
large blocks of data without some of it being lost. The new version
also allows simplifying some code.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24920 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:19 +00:00
uau 3e8ab86642 Replace hopefully unreachable code with abort()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24914 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:51:53 +00:00
uau 9e796deb33 dec_audio.c: Make some functions static
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24913 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:51:49 +00:00
uau 244bd237fb Simplify audio buffer allocation logic
Remove code that set sh_audio->a_out_buffer to equal
sh_audio->a_buffer between the calls to init_best_audio_codec and
init_audio_filters. Nothing uses the buffer between those calls.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24912 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:51:44 +00:00
uau 8338fa9ecf Reindent dec_audio.c
Also remove some commented out code


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24911 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:51:38 +00:00
diego 84157efa5a Clean up the way get_path is handled: Compile get_path.c to an object to link
against instead of directly #including the C file and replace the many extern
declarations by a proper header file.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-28 11:20:24 +00:00
diego 20d778b3fa Add explicit location for headers from the libmpdemux/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22619 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 17:51:32 +00:00
diego c0a30e606f Add explicit location for headers from the stream/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22617 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 17:10:36 +00:00
uau b7b0d8664d Fix memory leak when changing playback speed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22198 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-10 19:47:22 +00:00
uau 0d8f9453b5 Fix code that cuts audio data if the filters produce too much.
It incorrectly used the channel count and sample size values from the
decoder even though the filters can change those.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20768 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-07 23:16:55 +00:00
ivo eac9434e00 print bits/s, not bytes/s
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20093 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-06 21:56:15 +00:00
ivo 0242e630f9 display correct audio bitrate, samplerate and number of channels once
they are known for mplayer -identify



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19409 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-08-15 20:06:31 +00:00
uau 3b436fd963 Remove empty function that isn't used anywhere (and never has been??).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19399 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-08-14 17:55:38 +00:00
uau 77760ff64e Fix buffer size sanity check to match what is actually required.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19398 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-08-14 17:37:47 +00:00
reynaldo 132173bbf0 get_path as const, patch by Stefan Huehner, stefan AT huehner-org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18894 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-03 23:27:37 +00:00
reynaldo 3afd65b3af rm unnecesary casts from void* - part 3
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18884 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-02 08:17:07 +00:00
reynaldo 3a406e94d7 Get ride of the several if(identify) messy lines and rearangment of some of the output, both patches by Kiriuja mplayer-patches AT en-directo_net, his changes are barely unrelated, nevertheless Im commiting them thogeter just for the sake of my mental healt, I had both patches already applied on my local three
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18238 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-24 07:20:34 +00:00
aurel 808ce9a03a memalign segfaults when used without declaration on amd64 (default function return type is int so the pointer was trunctated to 32bits)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17636 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-02-16 22:43:42 +00:00
diego 52c917e583 Align memory at 16 byte boundaries.
This fixes crashes related to AltiVec as reported at
http://mplayerhq.hu/pipermail/mplayer-advusers/2006-January/001381.html
patch by Luca Barbato, lu_zero #at# gentoo #dot# org


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17626 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-02-14 09:55:14 +00:00
rathann e7db4ccf1a Patch by Stefan Huehner / stefan % huehner ! org \
patch replaces '()' for the correct '(void)' in function
declarations/prototypes which have no parameters. The '()' syntax tell
thats there is a variable list of arguments, so that the compiler cannot
check this. The extra CFLAG '-Wstrict-declarations' shows those cases.

Comments about a similar patch applied to ffmpeg:

That in C++ these mean the same, but in ANSI C the semantics are
different; function() is an (obsolete) K&R C style forward declaration,
it basically means that the function can have any number and any types
of parameters, effectively completely preventing the compiler from doing
any sort of type checking. -- Erik Slagter

Defining functions with unspecified arguments is allowed but bad.
With arguments unspecified the compiler can't report an error/warning
if the function is called with incorrect arguments. -- Måns Rullgård


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-02-09 14:08:03 +00:00
diego 53f42d7ecd Push "Building audio filter chain" up to verbose level.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17428 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-01-19 00:08:09 +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
diego f7e307ee4d Make a few more messages translatable by moving them into help_mp-en.h.
patch by Paul TT < paultt == at == hackerjournal == dot == it >


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16794 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-10-18 11:11:25 +00:00
reimar 0446e090b1 Allow forcing of demuxers and codecs by prepending '+'
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16322 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-08-30 23:56:24 +00:00
faust3 5d4798359e 10l, missing return
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16307 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-08-25 18:22:12 +00:00
reimar 7daf15dc89 -af-adv force=1 is now default (and thus also lavcresample)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15951 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-07-10 09:16:24 +00:00
reimar d22ae4a4d9 make -srate work again, unify audio filter init and preinit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15812 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-06-24 10:50:53 +00:00
gpoirier 9dd8f241ac adds some more -identify output, patch by kiriuja < mplayer DASH patches PAM en DASH directo POUM net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15790 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-06-20 23:07:35 +00:00
hzoli 067c0482d9 Remove file-global mpadec, add ad_driver member to sh_audio_t instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14820 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-02-25 11:17:43 +00:00
alex 6dbf6b4df1 finally remove the refences to bps outside libaf. also simplification of some messages and removed redundants
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14819 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-02-25 11:11:07 +00:00
hzoli e3cfcb169f If -af-adv force=4 is in effect, use ADCTRL_QUERY_FORMAT to query the
ad codec about float support and set floatne format if supported.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14816 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-02-25 10:39:16 +00:00
alex abe18b2f02 more verbose message
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14815 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-02-25 10:21:14 +00:00
iive 21dd8f38b9 Revert sh_audio->wf freeing.
Freeing should be done elsewhere, as it prevents second codec to access the same structure.
Reported by elupus at ecce.se


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14528 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-17 17:27:39 +00:00
alex 507121f7fe removing AFMT_ dependancy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14246 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-27 17:30:15 +00:00
iive a7fc263cd0 Free WAVEFORMATEX in sh_audio when all other sh_audio members are freed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13956 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-11-15 15:05:12 +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
reimar 1499a0df6f removed #ifdefs that are already handled by libao2/afmt.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12477 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-05-14 21:16:00 +00:00
rfelker 6a3e54b5f1 10l
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12385 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-05-01 20:00:04 +00:00
rfelker 672cd3861f not pretty, but at least it prevents the channels from getting out of order...
the real solution is to get rid of libaf (probably the worst code in mplayer!)
and replace it with a good audio layer...


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11858 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-01-27 06:30:16 +00:00
rfelker 2391e4c61a 10l
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11856 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-01-27 05:10:59 +00:00
alex 7504474eb9 minor leak fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10804 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-09-02 20:02:37 +00:00