[MPlayer-dev-eng] [PATCH] dvb fix

Nico nsabbi at libero.it
Mon Aug 25 13:08:13 CEST 2003



David Kuehling wrote:

>Hi,
>
>I just checked out the latest version (all of your patches were commited
>to CVS, no?), and am still having trouble.  One of the bugs I already
>tracked down:
>
>if channels.conf contains empty lines, dvbin.c still reads that line via
>sscanf and creates a channel with freq=0.  When seeking to such a
>"channel", mplayer endlessly displays
>
>dvb_streaming_read, attempt N. 5 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, attempt N. 4 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, attempt N. 3 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, attempt N. 2 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, attempt N. 1 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, return 0 bytes
>
>Ok, I fixed my channels.conf, but still I think should you do some error
>checking when reading it.  You should check `fields' returned from
>sscanf, and whether channel options like freq are within sane ranges.
>
there's a check for commented or spaced lined, but evidently it's not 
enough. I'll fix it.

>Would be very helpful if you output some errors, I had to read through
>your code to find out what was wrong...
>
>I did those tests with
>
>mplayer dvb://<channel> -vfm ffmpeg -nosound
>  
>
-vfm ffmpeg is no more needed, if you prefer you can use libmpeg2

>I still get A/V sync problems when enabling sound, making audio
>disappear after 15-20 seconds.  
>
did you increase those two macros in demuxer.h ? (MAX_PACKS and 
MAX_PACK_BYTES).
I didn't add this two changes to the patch, yet.
The syncronization problem doesn't belong to the demuxer: it can only 
push the right timestamps
(checked many times that they are correct) to make sure there's some 
(attempt of) syncro,
which is made my the main mplayer.
BTW it's strange that your audio gets killed: for all the streams I've 
seen so far with that bitrate and resolution
the default  values are perfectly fine, even for hours of playback.

>Zapping doesn't also work with "-cache
>4096".  When zapping quickly after startup/zapping, the cache is
>replayed and at the end mplayer exits.  When waiting long time before
>zapping, it works, but zapping is much slower with -cache than without
>(taking up to 10 seconds).
>
>  
>
why do use cache? it only makes things worse for such a high speed pipe. 
Try without it.
Zapping  takes longer because the dvb layer must  empty the cache  
before re-filling it with the content of the next channel
(otherwise  the decoder may crash after a resolution change, experienced 
many times).

>mplayer dvb://<channel> -vfm ffmpeg -nosound -cache 4096 
><after zapping>
>
>dvb_streaming_read, attempt N. 5 failed with errno 11 when reading 1048 bytes
>dvb_streaming_read, attempt N. 4 failed with errno 11 when reading 1048 bytes
>dvb_streaming_read, attempt N. 3 failed with errno 11 when reading 1048 bytes
>dvb_streaming_read, attempt N. 2 failed with errno 11 when reading 1048 bytes
>dvb_streaming_read, attempt N. 1 failed with errno 11 when reading 1048 bytes
>dvb_streaming_read, attempt N. 5 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, attempt N. 4 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, attempt N. 3 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, attempt N. 2 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, attempt N. 1 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, return 0 bytes
>Successfully enabled DPMS
>UNINIT COMPLETE
>TS file format detected.
>PROBING UP TO 2000000, PROG: 0
>...
>
>mplayer dvb://<channel> -vfm ffmpeg -nosound
><after zapping>
>
>dvb_streaming_read, attempt N. 1 failed with errno 11 when reading 716 bytes
>dvb_streaming_read, attempt N. 1 failed with errno 11 when reading 2048 bytes
>dvb_streaming_read, return 0 bytes
>Successfully enabled DPMS
>UNINIT COMPLETE
>TS file format detected.
>PROBING UP TO 2000000, PROG: 0
>...
>
>That's not coincidence, checked it many times with different channels.
>
>Unfortunately I'm not at work today and cannot do any uploads.  But
>being sick and staying home, gives me lots of time to tinker around with
>your DVB code :-)
>
>David
>

I never used DVB and cache together. Tonight I will try it and let you 
know if there is a fix.
Heal soon !

Nico




More information about the MPlayer-dev-eng mailing list