[MPlayer-dev-eng] [PATCH] Small bug in libmpdemux/demux_ts.c

Nico Sabbi nsabbi at tiscali.it
Sat Nov 5 00:14:42 CET 2005


Scott W. Larson wrote:

> I think collect_section() should return -1 instead of 0 when if finds 
> the buffer is too small. That's what the old parse_pmt() code did.
>
> This fix solves a problem of continuous "a52: CRC check failed!" 
> messages with some ATSC stations.
>
>------------------------------------------------------------------------
>
>diff -u -r1.38 demux_ts.c
>--- libmpdemux/demux_ts.c	31 Oct 2005 23:38:32 -0000	1.38
>+++ libmpdemux/demux_ts.c	4 Nov 2005 22:47:33 -0000
>@@ -1571,7 +1571,7 @@
> 	if(section->buffer_len < (skip+1+3+tlen))
> 	{
> 		mp_msg(MSGT_DEMUX, MSGL_DBG2, "DATA IS NOT ENOUGH, NEXT TIME\n");
>-		return 0;
>+		return -1;
> 	}
> 	
> 	return skip+1;
>  
>
>------------------------------------------------------------------------
>
>  
>

collect_section() checks that data collected in sections of tables 
(PAT/PMT/SL mess)
is enough to start decoding.
As fas as I remember it never returned  values < 0, nor there's any 
reason to do it.
Tables have nothing to do with AC3 data, that is carried in PES packets.
I suspect that the problem you are experiencing is due to something else.
If you can post a sample I will have a look at it.
Thanks,

    Nico




More information about the MPlayer-dev-eng mailing list