[MPlayer-dev-eng] [PATCH] Trivial ac3 skip/resync fix

Zoltan Hidvegi mplayer at hzoli.2y.net
Sun Feb 27 05:55:14 CET 2005


Sometimes when I play ac3 content, mainly from HDTV broadcast, the
audio gets garbled up because the ac3 decoder gets out of sync
somehow.  This usually happens after seeking, the decoder picks up the
stream at some bad point, and it cannot recover.  Unfortunately I
cannot reproduce it now, it does not happen often, but when it
happens, it is very annoying.

Anyways, I've found a bug which may be the root cause of this,
ADCTRL_SKIP_FRAME is broken in ad_liba52 and ad_hwac3.  They had a
break before the return CONTROL_TRUE statement, so they returned
CONTROL_UNKNOWN instead, which triggers some blind skip code.
Also neither implements ADCTRL_RESYNC_STREAM.  Some other ad_* modules
(e.g. ad_mp3lib) implements ADCTRL_RESYNC_STREAM as ADCTRL_SKIP_FRAME,
so I've added ADCTRL_RESYNC_STREAM to both ad_liba52 and ad_hwac3 to
do the same as ADCTRL_SKIP_FRAME.

See attached patch.  I'll commit it in a few days if nobody objects.

Zoli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ac3-skip.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050226/e3b52855/attachment.asc>


More information about the MPlayer-dev-eng mailing list