Skip to content

Commit 1b4bdae

Browse files
authored
Merge pull request frejoel#3 from intliang/master
gcc/clang compile error
2 parents 84230b7 + 3679f82 commit 1b4bdae

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/tsinfo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ int main(int argc, char **charv) {
7373
// this may happen if we read partial packets from file, or there was
7474
// some corruption in the TS stream.
7575
if(parsed < count) {
76-
memcpy(buffer, buffer, count - parsed);
76+
memmove(buffer, buffer, count - parsed);
7777
}
7878
} while(count > 0);
7979

@@ -99,7 +99,7 @@ void event_cb(TSDemuxContext *ctx, uint16_t pid, TSDEventId event_id, void *data
9999
TSDPESPacket *pes = (TSDPESPacket*) data;
100100
// This is where we would write the PES data into our buffer.
101101
printf("\n====================\n");
102-
printf("PID %d PES Packet, Size: %d\n", pid, pes->data_bytes_length);
102+
printf("PID %d PES Packet, Size: %d, stream_id=%u, pts=%llu, dts=%llu\n", pid, pes->data_bytes_length, pes->stream_id, pes->pts, pes->dts);
103103
}else if(event_id == TSD_EVENT_ADAP_FIELD_PRV_DATA) {
104104
// we're only watching for SCTE Adaptions Field Private Data,
105105
// so we know that we must parse it as a list of descritors.

src/tsdemux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ TSDCode tsd_parse_table(TSDemuxContext *ctx,
431431
ptr += section_len + 3;
432432
section_count++;
433433

434-
if((ptr+1) < dataCtx->write && *(ptr+1) == 0xFF) {
434+
if((ptr+1) < dataCtx->write && (*(ptr+1) == 0xFF) || (0x00 == *(ptr+1))) {
435435
// we found the end of the table,
436436
// clear the active buffer seeing as we've finished with the table
437437
ctx->buffers.active = NULL;

test/register_pid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
void test_register(void);
77
void test_deregister(void);
88

9-
int main(char **argc, int argv)
9+
int main(int argc, char **argv)
1010
{
1111
test_register();
1212
test_deregister();

0 commit comments

Comments
 (0)