summaryrefslogtreecommitdiff
path: root/src/libmad/xine_mad_decoder.c
AgeCommit message (Collapse)Author
2010-07-18Fix metronome not getting audio PTSGünter Merz
The xine libmad adaptor seemed not to forward the pts to the metronome: It buffers the MPEG audio packets until a threshold is reached (MAD_MIN_SIZE: 2889 bytes) and then has libmad decode the packets which is send to audio out. The pts of the last audio packet is forwarded on to metronome which can then sync video with audio. For the channel4 channels MPEG audio packets have a size of 576 bytes which means it takes five packets to fill the buffer enough for processing. In the stream every fifth audio packet contains a pts. The result of this is: If after a seek, the last audio packet is the one with the pts, video and audio are in sync. If the pts is in any of the four previous ones no pts will reach metronome and video and audio will never be synced before a new seek and even then there's a one in five chance that video and audio are not synced. Other channels did not show this behaviour because e.g. BBC One has an audio packet size of about 750 bytes and send a pts every fifth packet as well. This means that not every pts from the stream gets through to metronome but some do. This also means that syncing after a seek is probably not as quick as it could be but it will sync. My workaround to this problem is to start decoding not only when a the buffer has reached a threshold but also when a pts != 0 arrives. This does mean however that the buffer isn't always filled to the theshold and decoding might not perform as well as it could. --HG-- extra : transplant_source : %EC%90%EB%AA%8A%C7%BD%A4%B7%EE%F5%E9%E8SY%89S%9D0s
2009-11-30Trim trailing space & reduce space+tab.Darren Salt
2009-04-25Merge -gapless branch.Darren Salt
2009-01-18Remove '#include "config.h"' from all public header files.Darren Salt
This requires that many other files include config.h themselves. Also convert <config.h> to "config.h".
2008-05-07xine_xmalloc() deprecation: replace its use with static and non-zero size.Diego 'Flameeyes' Pettenò
The xine_xmalloc() function is going to be deprecated, as its behaviour is rarely needed as such, and it's thus misused. With this, almost all uses of xine_xmalloc() with static size (for instance the value returned by sizeof()) or with a size that is guaranteed not to be zero (like strlen()+1) are replaced with calls to either calloc(1, ...) or malloc(). malloc() is used whenever the allocated memory is going to be immediately overwritten, while calloc() is used in every other case, as it sets the whole memory area to zero. --HG-- extra : transplant_source : %8F%98%EC%02%1E%83%F0s%06X%83C%205Y%80%B12%CC%E1
2008-01-10Added audio padding handling.Thibaut Mattern
Fixed pts handling.
2007-11-10Delete most of the CVS $Id$/$Log$ lines.Darren Salt
--HG-- extra : transplant_source : %E0%D0%C5%8B%BEU%DD%24%5D7%1F%ADV%AD%EB%23%CBU%80%EB
2007-08-15Workaround for recent glibc & -D_FORTIFY_SOURCE=2 (defines open() as a macro).Darren Salt
According to bug 1773769, this breaks foo->open(). The fix (as used in Ville Skyttä's patch, which doesn't cover all cases) is to replace this with (foo->open)(). This patch was generated using sed -i -re 's/(([[:alnum:]_]+(->|\.))+open) ?\(/(\1) (/' `grep '[>.]open \?(' include -rIl` One change (in a comment) is not committed.
2007-05-31Don't include the local copy of frame.h and synth.h when building with ↵Diego 'Flameeyes' Pettenò
external libmad.
2008-04-07Shift some audio plugin priorities: swap libreal & ffmpeg, otherwise 7 to 8.Darren Salt
2008-01-23Fixed pts handling, used the amount of data stored in the internal buffer to ↵Thibaut Mattern
compensate pts.
2008-01-19Be sure libmad has enough data.Thibaut Mattern
Fixed random glitches.
2007-04-04Rename xine_decoder.c to xine_mad_decoder.c.Diego 'Flameeyes' Pettenò
Use xineplug_LTLIBRARIES. --HG-- rename : src/libmad/xine_decoder.c => src/libmad/xine_mad_decoder.c