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%4018
issue20
tibs 2008-06-26 09:21:05 +00:00
rodzic 7a02df44f7
commit 3c0dac2bb5
3 zmienionych plików z 16 dodań i 10 usunięć

Wyświetl plik

@ -655,7 +655,7 @@ int main(int argc, char **argv)
if (use_server)
{
// 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;
}
}

21
pes.c
Wyświetl plik

@ -1391,9 +1391,6 @@ static int read_next_PES_packet_from_TS(PES_reader_p reader,
// by the underlying buffering methods.
// So, just in case, we'll check for an unbounded (length marked as
// 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);
if (*packet_data == NULL)
return EOF;
@ -1415,6 +1412,11 @@ static int read_next_PES_packet_from_TS(PES_reader_p reader,
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
// is probably a sensible place to do it.
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
{
// 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;
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,
// 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

Wyświetl plik

@ -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)
printf("DROPPING: Keeping %d TS packet%s, then dropping (throwing away) %d\n",
context.drop_packets,(context.drop_packets==1?"":"s"),