Commit ca466ffa authored by Jean-Paul Saman's avatar Jean-Paul Saman

misc: fix PAT and PMT generator test applications.

parent 76803dd0
Changes between 0.2.2 and 1.0.0_pre2:
Changes between 0.2.2 and 1.0.0_pre3:
--------------------------------
* new example application dvbinfo: use 'dvbinfo -h' for more information on commandline options
* misc examples: fixes to gen_pat, gen_pmt
* updated documentation (new api howto)
* add log callback (remove fprintf's)
* make API more consistent, see doxygen "howto-new-api" section for converting your code:
......
AC_INIT(libdvbpsi, 1.0.0_pre2)
AC_INIT(libdvbpsi, 1.0.0_pre3)
AC_PREREQ(2.50)
AC_CONFIG_AUX_DIR(.auto)
......
......@@ -56,6 +56,7 @@ static void writePSI(uint8_t* p_packet, dvbpsi_psi_section_t* p_section)
while(p_section)
{
size_t i_bytes_written = 0;
uint8_t* p_pos_in_ts;
uint8_t* p_byte = p_section->p_data;
uint8_t* p_end = p_section->p_payload_end
......@@ -71,8 +72,12 @@ static void writePSI(uint8_t* p_packet, dvbpsi_psi_section_t* p_section)
*(p_pos_in_ts++) = *(p_byte++);
while(p_pos_in_ts < p_packet + 188)
*(p_pos_in_ts++) = 0xff;
fwrite(p_packet, 1, 188, stdout);
i_bytes_written = fwrite(p_packet, 1, 188, stdout);
if(i_bytes_written == 0)
{
fprintf(stderr,"eof detected ... aborting\n");
return;
}
p_packet[3] = (p_packet[3] + 1) & 0x0f;
while(p_byte < p_end)
......@@ -86,8 +91,12 @@ static void writePSI(uint8_t* p_packet, dvbpsi_psi_section_t* p_section)
*(p_pos_in_ts++) = *(p_byte++);
while(p_pos_in_ts < p_packet + 188)
*(p_pos_in_ts++) = 0xff;
fwrite(p_packet, 1, 188, stdout);
i_bytes_written = fwrite(p_packet, 1, 188, stdout);
if(i_bytes_written == 0)
{
fprintf(stderr,"eof detected ... aborting\n");
return;
}
p_packet[3] = (p_packet[3] + 1) & 0x0f;
}
......
......@@ -61,6 +61,7 @@ static void writePSI(uint8_t* p_packet, dvbpsi_psi_section_t* p_section)
while(p_section)
{
size_t i_bytes_written = 0;
uint8_t* p_pos_in_ts;
uint8_t* p_byte = p_section->p_data;
uint8_t* p_end = p_section->p_payload_end
......@@ -76,8 +77,12 @@ static void writePSI(uint8_t* p_packet, dvbpsi_psi_section_t* p_section)
*(p_pos_in_ts++) = *(p_byte++);
while(p_pos_in_ts < p_packet + 188)
*(p_pos_in_ts++) = 0xff;
fwrite(p_packet, 1, 188, stdout);
i_bytes_written = fwrite(p_packet, 1, 188, stdout);
if(i_bytes_written == 0)
{
fprintf(stderr,"eof detected ... aborting\n");
return;
}
p_packet[3] = (p_packet[3] + 1) & 0x0f;
while(p_byte < p_end)
......@@ -91,7 +96,12 @@ static void writePSI(uint8_t* p_packet, dvbpsi_psi_section_t* p_section)
*(p_pos_in_ts++) = *(p_byte++);
while(p_pos_in_ts < p_packet + 188)
*(p_pos_in_ts++) = 0xff;
fwrite(p_packet, 1, 188, stdout);
i_bytes_written = fwrite(p_packet, 1, 188, stdout);
if(i_bytes_written == 0)
{
fprintf(stderr,"eof detected ... aborting\n");
return;
}
p_packet[3] = (p_packet[3] + 1) & 0x0f;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment