Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118436 - mplayer a52 CRC and resampling error patch
Summary: mplayer a52 CRC and resampling error patch
Status: VERIFIED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: media-video herd
URL: http://www.pchdtv.com/forum/viewtopic...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-09 11:21 UTC by Matthew Schultz
Modified: 2006-06-25 09:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patches demux_ts.c to get rid of the a52 sound errors (demux_ts.patch,399 bytes, patch)
2006-02-08 23:31 UTC, Matthew Schultz
Details | Diff
Patches demux_ts.c to get rid of the a52 CRC sound errors (sound.patch,990 bytes, patch)
2006-02-26 15:15 UTC, Matthew Schultz
Details | Diff
Patch for 20060415 (mplayer-1.0.20060415-sound.patch,682 bytes, patch)
2006-05-28 15:19 UTC, Matthew Schultz
Details | Diff
New ebuild for 20060415 which includes the sound patch (mplayer-1.0.20060415-r1.ebuild,16.67 KB, text/plain)
2006-05-28 15:21 UTC, Matthew Schultz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Schultz 2006-01-09 11:21:39 UTC
I'd like to suggest a patch to the source for mplayer (given the glacial development pace of mplayer) that fixes (I've verified that it works on my x86-based system compiled from source) these errors when playing many dvb streams in mplayer: 

a52: error at resampling
a52: CRC check failed!

These errors pile up to such an extent that mplayer will halt after a minute or less of playing a dvb stream.  Without this proposed patch, mplayer is wholly unusable to play dvb streams.

In libmpdemux/demux_ts.c, in function parse_pes2() look for this code:

else if ((p[0] & 0xF0) == 0x80)
    {
      mp_msg(MSGT_DEMUX, MSGL_DBG2, "A52 WITH HEADER\n");
      es->start   = p+4;
      es->size    = packet_len - 4;
      es->type    = AUDIO_A52;
      es->payload_size -= packet_len;
                                                                               
      return 1;
    }

Quote: 
I've never seen an AC-3 packet with a header before but I think the header bytes are already gone at this point in the code so it's starting four bytes past the packet data. So take out the plus and minus fours:

   else if ((p[0] & 0xF0) == 0x80)
    {
      mp_msg(MSGT_DEMUX, MSGL_DBG2, "A52 WITH HEADER\n");
      es->start   = p;
      es->size    = packet_len;
      es->type    = AUDIO_A52;
      es->payload_size -= packet_len;
                                                                               
      return 1;
    }
Comment 1 Matthew Schultz 2006-01-09 12:02:45 UTC
I'd also like to add that I card I am using is the Dvico Fusion Gold 5 card (ATSC) and us-cable (QAM_256).
Comment 2 Patrick McLean gentoo-dev 2006-02-08 21:39:15 UTC
mplayer development is actually moving quite rapidly, they just haven't made any releases in awhile.

It would be much more convienent for us if you could provide a patch ("diff -u original revised" is the standard patch generation command).
Comment 3 Matthew Schultz 2006-02-08 23:31:36 UTC
Created attachment 79298 [details, diff]
Patches demux_ts.c to get rid of the a52 sound errors

It seems to me like they need to make a new release given the large amount of bugs needing to be fixed with the current version.  The users are patching the software faster than the developers.
Comment 4 Matthew Schultz 2006-02-18 10:46:23 UTC
I just emerged 1.0.20060217 and it _still_ has the a52 CRC errors.  I still suggest using this patch if you want to be able to watch any dvb streams.
Comment 5 Reimar Döffinger 2006-02-23 14:04:47 UTC
Discussion and hopefully better patch in
http://thread.gmane.org/gmane.comp.video.mplayer.devel/32140
Comment 6 Matthew Schultz 2006-02-26 15:11:34 UTC
I can confirm that the patch posted at gmane.org works and it is a patch posted by the author of that section of the code in mplayer so someone needs to patch the mplayer in portage with this patch ASAP.
Comment 7 Matthew Schultz 2006-02-26 15:15:02 UTC
Created attachment 80798 [details, diff]
Patches demux_ts.c to get rid of the a52 CRC sound errors

This patch was written by the author and it looks like it's been submitted to mplayer's cvs.  So I urge gentoo developers to grab the latest cvs from mplayer again and update.
Comment 8 Matthew Schultz 2006-03-05 22:16:08 UTC
I just tested 1.0.20060302 and unfortunately it looks like the patch hasn't made it in yet but I suppose it should pretty soon?
Comment 9 Luca Barbato gentoo-dev 2006-03-20 00:22:12 UTC
I do hope so
Comment 10 Matthew Schultz 2006-05-28 14:33:37 UTC
I don't know what's taking upstream so long to patch this.  In the mean time, why don't we patch the ebuild with this patch?
Comment 11 Matthew Schultz 2006-05-28 15:19:14 UTC
Created attachment 87763 [details, diff]
Patch for 20060415

This patch can be used to patch the 20060415 ebuild.
Comment 12 Matthew Schultz 2006-05-28 15:21:57 UTC
Created attachment 87764 [details]
New ebuild for 20060415 which includes the sound patch

I have created a revision to 20060415 to patch this sound issue since upstream can't seem to apply their own patches in a timely manner.
Comment 13 Matthew Schultz 2006-06-24 10:36:56 UTC
This patch is no longer needed as upstream has _finally_ checked this patch into source.  Everyone should upgrade to Mplayer 1.0_pre8 or higher immediately.
Comment 14 Luca Barbato gentoo-dev 2006-06-24 18:43:31 UTC
mplayer is already available, sorry for the delay
Comment 15 Matthew Schultz 2006-06-25 09:50:39 UTC
Well it doesn't look like this patch was applied but it seems like the problem was fixed somewhere else as I don't have any a52 CRC errors on any of the streams anymore.