kopia lustrzana https://github.com/F5OEO/tstools
Fix an incorrect call (how did that slip past?) in esreverse, and
stop inappropriate writing of (extra, possibly wrong) program data when we are mirroring TS packets directly. --HG-- extra : convert_revision : svn%3Aeff31bef-be4a-0410-a8fe-e47997df2690/trunk%4018issue20
rodzic
7a02df44f7
commit
3c0dac2bb5
|
|
@ -655,7 +655,7 @@ int main(int argc, char **argv)
|
||||||
if (use_server)
|
if (use_server)
|
||||||
{
|
{
|
||||||
// For testing purposes, let's try outputting video as we collect data
|
// For testing purposes, let's try outputting video as we collect data
|
||||||
set_server_output(es->reader,output.ts_output,100);
|
set_server_output(es->reader,output.ts_output,FALSE,100);
|
||||||
es->reader->debug_read_packets = TRUE;
|
es->reader->debug_read_packets = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
21
pes.c
21
pes.c
|
|
@ -1391,9 +1391,6 @@ static int read_next_PES_packet_from_TS(PES_reader_p reader,
|
||||||
// by the underlying buffering methods.
|
// by the underlying buffering methods.
|
||||||
// So, just in case, we'll check for an unbounded (length marked as
|
// So, just in case, we'll check for an unbounded (length marked as
|
||||||
// zero) video stream PES packet
|
// zero) video stream PES packet
|
||||||
// XXX Note that an unbounded packet will thus not be correctly written
|
|
||||||
// XXX out when we've been asked to write_TS_packets -- fix this if it
|
|
||||||
// XXX ever becomes a problem
|
|
||||||
check_for_EOF_packet(reader,packet_data);
|
check_for_EOF_packet(reader,packet_data);
|
||||||
if (*packet_data == NULL)
|
if (*packet_data == NULL)
|
||||||
return EOF;
|
return EOF;
|
||||||
|
|
@ -1415,6 +1412,11 @@ static int read_next_PES_packet_from_TS(PES_reader_p reader,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG_PES_ASSEMBLY
|
||||||
|
printf("@@@ TS packet at " OFFSET_T_FORMAT " with pid %3x",
|
||||||
|
reader->posn,pid);
|
||||||
|
#endif
|
||||||
|
|
||||||
// If we're writing out TS packets directly to a client, then this
|
// If we're writing out TS packets directly to a client, then this
|
||||||
// is probably a sensible place to do it.
|
// is probably a sensible place to do it.
|
||||||
if (reader->write_TS_packets && reader->tswriter != NULL &&
|
if (reader->write_TS_packets && reader->tswriter != NULL &&
|
||||||
|
|
@ -1429,12 +1431,6 @@ static int read_next_PES_packet_from_TS(PES_reader_p reader,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if DEBUG_PES_ASSEMBLY
|
|
||||||
printf("@@@ TS packet at " OFFSET_T_FORMAT " with pid %3x",
|
|
||||||
reader->posn,pid);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (pid == 0) // PAT
|
if (pid == 0) // PAT
|
||||||
{
|
{
|
||||||
// XXX We should probably check that the PAT for our program
|
// XXX We should probably check that the PAT for our program
|
||||||
|
|
@ -3716,6 +3712,13 @@ extern int write_program_data(PES_reader_p reader,
|
||||||
int err;
|
int err;
|
||||||
u_int32 pcr_pid;
|
u_int32 pcr_pid;
|
||||||
|
|
||||||
|
// If we are writing out TS data as a side effect of reading TS when
|
||||||
|
// assembling our PES packets, we should not write out any program
|
||||||
|
// data ourselves, as it is (or should be) already in the TS data
|
||||||
|
if (reader->write_TS_packets &&
|
||||||
|
!reader->suppress_writing) // should we care about suppression?
|
||||||
|
return 0;
|
||||||
|
|
||||||
// Of course, if we haven't *found* any program information yet,
|
// Of course, if we haven't *found* any program information yet,
|
||||||
// there's not much we can do (even if the user is overriding the
|
// there's not much we can do (even if the user is overriding the
|
||||||
// program information for TS data, we still won't have worked out
|
// program information for TS data, we still won't have worked out
|
||||||
|
|
|
||||||
|
|
@ -3881,6 +3881,9 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context.tsdirect && !quiet)
|
||||||
|
printf("Serving all TS packets, not just video/audio streams\n");
|
||||||
|
|
||||||
if (context.drop_packets && !quiet)
|
if (context.drop_packets && !quiet)
|
||||||
printf("DROPPING: Keeping %d TS packet%s, then dropping (throwing away) %d\n",
|
printf("DROPPING: Keeping %d TS packet%s, then dropping (throwing away) %d\n",
|
||||||
context.drop_packets,(context.drop_packets==1?"":"s"),
|
context.drop_packets,(context.drop_packets==1?"":"s"),
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue