- update OFFSET field

Original commit message from CVS:
- update OFFSET field
- flush unkown codes
- small cleanups
This commit is contained in:
Wim Taymans 2003-05-24 10:17:50 +00:00
parent f5897c479c
commit 1ac9874937
3 changed files with 9 additions and 2 deletions

View file

@ -675,6 +675,7 @@ done:
outbuf = gst_buffer_create_sub (buffer, headerlen + 4, datalen);
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buffer) + headerlen + 4;
GST_DEBUG (0, "pushing buffer of len %d id %d, ts %" G_GINT64_FORMAT,
datalen, id, GST_BUFFER_TIMESTAMP (outbuf));
@ -951,6 +952,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
outbuf = gst_buffer_create_sub (buffer, headerlen+4, datalen);
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buffer) + headerlen + 4;
gst_pad_push(*outpad,outbuf);
}

View file

@ -255,6 +255,7 @@ gst_mpeg_packetize_read (GstMPEGPacketize *packetize)
break;
default:
if (packetize->MPEG2 && ((packetize->id < 0xBD) || (packetize->id > 0xFE))) {
gst_bytestream_flush (packetize->bs, 4);
g_warning ("packetize: ******** unknown id 0x%02X",packetize->id);
}
else {

View file

@ -359,7 +359,9 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
mpeg_parse->next_scr = scr;
}
GST_DEBUG (0, "SCR is %" G_GUINT64_FORMAT " (%" G_GUINT64_FORMAT ") next: %" G_GINT64_FORMAT " (%" G_GINT64_FORMAT ") diff: %" G_GINT64_FORMAT " (%" G_GINT64_FORMAT ")",
GST_DEBUG (0, "SCR is %" G_GUINT64_FORMAT " (%" G_GUINT64_FORMAT ") next: %"
G_GINT64_FORMAT " (%" G_GINT64_FORMAT ") diff: %" G_GINT64_FORMAT " (%"
G_GINT64_FORMAT ")",
scr,
MPEGTIME_TO_GSTTIME (scr),
mpeg_parse->next_scr,
@ -369,7 +371,9 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
MPEGTIME_TO_GSTTIME (mpeg_parse->next_scr));
if (ABS ((gint64)mpeg_parse->next_scr - (gint64)(scr_adj)) > mpeg_parse->max_discont) {
GST_DEBUG (0, "discontinuity detected; expected: %" G_GUINT64_FORMAT " got: %" G_GUINT64_FORMAT " real:%" G_GINT64_FORMAT " adjust:%" G_GINT64_FORMAT,
GST_DEBUG (0, "discontinuity detected; expected: %"
G_GUINT64_FORMAT " got: %" G_GUINT64_FORMAT " real:%"
G_GINT64_FORMAT " adjust:%" G_GINT64_FORMAT,
mpeg_parse->next_scr, scr_adj, scr, mpeg_parse->adjust);
mpeg_parse->adjust = mpeg_parse->next_scr - scr;