[Mplayer-dvb] [PATCH]: dvb_in module fixes

Nico nsabbi at libero.it
Tue Apr 29 17:58:32 CEST 2003



Jukka Neppius wrote:

>"Nico"  writes:
>
>  
>
>>Ouch!  You can hard-code it in dvbin.c, in function dvb_streaming_start.
>>    
>>
>
>Done!
>
>1:
>  dvbin.c:dvb_streaming_start 
>has
>  strncpy(type, "TER", 3);     
>
>So string terminator is not copied.
>
>So in 
>  dvbin.c:dvb_channels_list
>  if(! strcmp(type, "TER"))
>fails and execution continues at 
>  else	//SATELLITE
>
>
>Why not use 
>  strcpy(type, "TER");
>or 
>  strncpy(type, "TER", 4);
>?
>
>
>
>2:
>dvbin.c:dvb_get_channels
> if( fgets(line, 128, f) == NULL ) continue;
>
>128 is not enough for channels.conf generated by scan from
>dvb-20030331.tar.bz2.  Longest line I have has 145 B.
>So :
>
>#define CHANNEL_LINE_LEN 256
>uint8_t line[CHANNEL_LINE_LEN];
>if( fgets(line, CHANNEL_LINE_LEN, f) == NULL ) continue;
>
>  
>

OK, I'll update it

>Now it seems to work!!!!
>
>Not perfect though. It closes video window when changing channels.
>Because my channels.conf is autogenerated, it contains streams with no
>video.  No video window is opened, so how do I switch to next channel?
>
h = next channel,   k= previous channel

>For example:
>
>Vastaanotinpäivitykset:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:
>FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0
>
>Translation of first words is roughly: "updates for receiver".  I can
>only guess what it means.
>
>- I'll add some # to my channels.conf
>
>- Better, but still something wrong.
>  
>

The windows must be closed and reopened because  when the next channel 
changes bitrate or resolution the decoder doesn't like it and crashes.
It's possible to have audio only streams, setting vid to 0 and aid to a 
number, but the next line has both to 0, so it seems to be a data only 
channel =>
nothing useful for mplayer. Am I right?

>
>Perhaps I should remove channel with name "not in use" although pids
>seem reasonable:514:670  Doing this automatically is more difficult.
>  
>
Yes, those and the channels that you know to be encrypted, otherwise 
mplayer (at the moment) blocks.
I have to add a check to demux_ts.c to make it discard encrypted streams 
(based on two bits set).

>
>
>
>
>3: I have to command: rm libmpdemux/libmpdemux.a ; make because make
>does not know that libmpdemux.a depends on dvbin.o
>
>  
>
it's a "feature" never fixed in the main Makefile; you can also run
make -C libmpdemux; make

>
>4: 
>make distclean
>These didn't go away:
>
>./libmpdemux/realrtsp/asmrp.o
>./libmpdemux/realrtsp/real.o
>./libmpdemux/realrtsp/rmff.o
>./libmpdemux/realrtsp/rtsp.o
>./libmpdemux/realrtsp/rtsp_session.o
>./libmpdemux/realrtsp/sdpplin.o
>./libmpdemux/realrtsp/xbuffer.o
>
>
>- Jukka
>
>_______________________________________________
>  
>
and also config.mak, config.h, help/*,   */*.a and others.

I reported this problem, but it's still there.

Thanks very much for you help and your patience, tonight I'll apply 
those fixes.

            Nico






More information about the MPlayer-dvb mailing list