kopia lustrzana https://github.com/F5OEO/tstools
Squash "set but not used" warnings
rodzic
f1d24ff47e
commit
d23171865f
18
l2audio.c
18
l2audio.c
|
@ -141,9 +141,11 @@ static int peek_frame_header(const uint32_t header)
|
||||||
// byte protected, private;
|
// byte protected, private;
|
||||||
// byte mode, modex, copyright, original, emphasis;
|
// byte mode, modex, copyright, original, emphasis;
|
||||||
unsigned int bitrate_enc, sampling_enc;
|
unsigned int bitrate_enc, sampling_enc;
|
||||||
unsigned int bitrate, sampling;
|
unsigned int bitrate;
|
||||||
byte rate;
|
// unsigned int sampling;
|
||||||
unsigned int framesize, framelen;
|
byte rate;
|
||||||
|
// unsigned int framesize
|
||||||
|
unsigned int framelen;
|
||||||
|
|
||||||
// Version:
|
// Version:
|
||||||
// 00 - MPEG Version 2.5
|
// 00 - MPEG Version 2.5
|
||||||
|
@ -197,7 +199,7 @@ static int peek_frame_header(const uint32_t header)
|
||||||
print_err("### Illegal sampleing_enc (3) in MPEG layer 2 audio header\n");
|
print_err("### Illegal sampleing_enc (3) in MPEG layer 2 audio header\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sampling = sampling_table[version-1][sampling_enc];
|
// sampling = sampling_table[version-1][sampling_enc];
|
||||||
|
|
||||||
// Make an AAC rate number from the rate number
|
// Make an AAC rate number from the rate number
|
||||||
rate = (version * 3) + (sampling_enc & 2) + (sampling_enc == 0);
|
rate = (version * 3) + (sampling_enc & 2) + (sampling_enc == 0);
|
||||||
|
@ -224,18 +226,18 @@ static int peek_frame_header(const uint32_t header)
|
||||||
// (for the moment, we only *use* the frame length)
|
// (for the moment, we only *use* the frame length)
|
||||||
if (layer == 1)
|
if (layer == 1)
|
||||||
{
|
{
|
||||||
framesize = 384; // samples
|
// framesize = 384; // samples
|
||||||
framelen = (12000 * bitrate / aud_frame_rate_n[rate] + padding) * 4;
|
framelen = (12000 * bitrate / aud_frame_rate_n[rate] + padding) * 4;
|
||||||
}
|
}
|
||||||
else if (version == 1)
|
else if (version == 1)
|
||||||
{
|
{
|
||||||
framesize = 1152; // samples
|
// framesize = 1152; // samples
|
||||||
framelen = (144000 * bitrate / aud_frame_rate_n[rate] + padding);
|
framelen = (144000 * bitrate / aud_frame_rate_n[rate] + padding);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
framesize = 576; // samples
|
// framesize = 576; // samples
|
||||||
framelen = (72000 * bitrate / aud_frame_rate_n[rate] + padding);
|
framelen = (72000 * bitrate / aud_frame_rate_n[rate] + padding);
|
||||||
}
|
}
|
||||||
return framelen;
|
return framelen;
|
||||||
}
|
}
|
||||||
|
|
4
pes.c
4
pes.c
|
@ -3538,7 +3538,7 @@ extern int find_ESCR_in_PES(byte data[],
|
||||||
uint64_t *escr)
|
uint64_t *escr)
|
||||||
{
|
{
|
||||||
byte stream_id;
|
byte stream_id;
|
||||||
int packet_length;
|
// int packet_length;
|
||||||
byte *bytes;
|
byte *bytes;
|
||||||
|
|
||||||
*got_escr = FALSE; // pessimistic
|
*got_escr = FALSE; // pessimistic
|
||||||
|
@ -3553,7 +3553,7 @@ extern int find_ESCR_in_PES(byte data[],
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_id = data[3];
|
stream_id = data[3];
|
||||||
packet_length = (data[4] << 8) | data[5];
|
// packet_length = (data[4] << 8) | data[5];
|
||||||
|
|
||||||
// if (packet_length == 0) // Elementary video data of unspecified length
|
// if (packet_length == 0) // Elementary video data of unspecified length
|
||||||
// return 0;
|
// return 0;
|
||||||
|
|
|
@ -62,7 +62,7 @@ void ensurePidList(int nr)
|
||||||
int main(int argn, char *args[])
|
int main(int argn, char *args[])
|
||||||
{
|
{
|
||||||
int ii = 1;
|
int ii = 1;
|
||||||
int verbose = FALSE;
|
// int verbose = FALSE; // Currently unused
|
||||||
int invert = 0;
|
int invert = 0;
|
||||||
unsigned int max_pkts = (unsigned int)-1;
|
unsigned int max_pkts = (unsigned int)-1;
|
||||||
const char *input_file = NULL, *output_file = NULL;
|
const char *input_file = NULL, *output_file = NULL;
|
||||||
|
@ -88,7 +88,7 @@ int main(int argn, char *args[])
|
||||||
}
|
}
|
||||||
else if (!strcmp("-verbose", args[ii]) || !strcmp("-v", args[ii]))
|
else if (!strcmp("-verbose", args[ii]) || !strcmp("-v", args[ii]))
|
||||||
{
|
{
|
||||||
verbose = TRUE;
|
// verbose = TRUE;
|
||||||
}
|
}
|
||||||
else if (!strcmp("-m", args[ii]) || !strcmp("-max", args[ii]))
|
else if (!strcmp("-m", args[ii]) || !strcmp("-max", args[ii]))
|
||||||
{
|
{
|
||||||
|
|
6
tsplay.c
6
tsplay.c
|
@ -351,7 +351,6 @@ int main(int argc, char **argv)
|
||||||
enum TS_writer_type how = TS_W_UNDEFINED; // how to output our TS data
|
enum TS_writer_type how = TS_W_UNDEFINED; // how to output our TS data
|
||||||
char *output_name = NULL; // the output filename/host
|
char *output_name = NULL; // the output filename/host
|
||||||
int port = 88; // the port to connect to
|
int port = 88; // the port to connect to
|
||||||
int use_network = FALSE;
|
|
||||||
char *multicast_if = NULL; // IP address of multicast i/f
|
char *multicast_if = NULL; // IP address of multicast i/f
|
||||||
|
|
||||||
tsplay_output_pace_mode pace_mode = TSPLAY_OUTPUT_PACE_PCR2_TS;
|
tsplay_output_pace_mode pace_mode = TSPLAY_OUTPUT_PACE_PCR2_TS;
|
||||||
|
@ -459,7 +458,6 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
CHECKARG("tsplay",ii);
|
CHECKARG("tsplay",ii);
|
||||||
had_output_name = TRUE;
|
had_output_name = TRUE;
|
||||||
use_network = FALSE;
|
|
||||||
how = TS_W_FILE;
|
how = TS_W_FILE;
|
||||||
output_name = argv[ii+1];
|
output_name = argv[ii+1];
|
||||||
ii++;
|
ii++;
|
||||||
|
@ -473,7 +471,6 @@ int main(int argc, char **argv)
|
||||||
else if (!strcmp("-stdout",argv[ii]))
|
else if (!strcmp("-stdout",argv[ii]))
|
||||||
{
|
{
|
||||||
had_output_name = TRUE; // more or less
|
had_output_name = TRUE; // more or less
|
||||||
use_network = FALSE;
|
|
||||||
how = TS_W_STDOUT;
|
how = TS_W_STDOUT;
|
||||||
output_name = NULL;
|
output_name = NULL;
|
||||||
redirect_output_stderr();
|
redirect_output_stderr();
|
||||||
|
@ -506,7 +503,6 @@ int main(int argc, char **argv)
|
||||||
print_err("### tsplay: -tcp does not make sense with file output\n");
|
print_err("### tsplay: -tcp does not make sense with file output\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
use_network = TRUE;
|
|
||||||
how = TS_W_TCP;
|
how = TS_W_TCP;
|
||||||
}
|
}
|
||||||
else if (!strcmp("-udp",argv[ii]))
|
else if (!strcmp("-udp",argv[ii]))
|
||||||
|
@ -516,7 +512,6 @@ int main(int argc, char **argv)
|
||||||
print_err("### tsplay: -udp does not make sense with file output\n");
|
print_err("### tsplay: -udp does not make sense with file output\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
use_network = TRUE;
|
|
||||||
how = TS_W_UDP;
|
how = TS_W_UDP;
|
||||||
}
|
}
|
||||||
else if (!strcmp("-max",argv[ii]) || !strcmp("-m",argv[ii]))
|
else if (!strcmp("-max",argv[ii]) || !strcmp("-m",argv[ii]))
|
||||||
|
@ -693,7 +688,6 @@ int main(int argc, char **argv)
|
||||||
err = host_value("tsplay",NULL,argv[ii],&output_name,&port);
|
err = host_value("tsplay",NULL,argv[ii],&output_name,&port);
|
||||||
if (err) return 1;
|
if (err) return 1;
|
||||||
had_output_name = TRUE;
|
had_output_name = TRUE;
|
||||||
use_network = TRUE;
|
|
||||||
if (how == TS_W_UNDEFINED)
|
if (how == TS_W_UNDEFINED)
|
||||||
how = TS_W_UDP;
|
how = TS_W_UDP;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue