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

Jukka Neppius jkn at softavenue.fi
Tue Apr 29 17:06:36 CEST 2003


"Nico" <nsabbi at libero.it> 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;


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?
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.


Perhaps I should remove channel with name "not in use" although pids
seem reasonable:514:670  Doing this automatically is more difficult.





3: I have to command: rm libmpdemux/libmpdemux.a ; make because make
does not know that libmpdemux.a depends on dvbin.o



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



More information about the MPlayer-dvb mailing list