[MPlayer-dev-eng] [PATCH] ad_mpg123: runtime format switch and not closing stream during decodeh

Thomas Orgis thomas-forum at orgis.org
Mon Sep 23 14:30:04 CEST 2013


Hi,

this patch is not really different from the ad_mpg123 attached to
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=2149 , but is tested
against r36458 of MPlayer SVN.

This fixes the issue raised in bug 2149 by avoiding artificial creation
of an error situation if the apparent audio format of the stream
changes. You can play wildly concatenated stream now with the decoder
adapting. I tested this with MP3 pieces of differing sampling rates and
even mixing MP2 and MP3 pieces. There, ad_mpg123 is more tolerant than
ffmp3 or ffmp3float.

Regarding really unexpected failures that used to be treated with
closing the stream in libmpg123, those closings are gone. Decoding
errors (that really are not to be expected, but imaginable, given that
no code is bug-free) are indicated with -1 returned from decode_audio,
nothing more.


Alrighty then,

Thomas

PS: I would like to offer default (16 bit) and floating point output,
the difference being this line in ad_mpg123:

mpg123_param(con->handle, MPG123_ADD_FLAGS, MPG123_FORCE_FLOAT, 0.);

(some more lines would achieve selection of s16, s32, etc.). How would
one do that with least amount of duplication? Multiple codecs with one
source? Configuration variables?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-mpg123_flexformat_noclose.patch
Type: text/x-patch
Size: 10005 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130923/f64c9089/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130923/f64c9089/attachment.asc>


More information about the MPlayer-dev-eng mailing list