base->stream_size = sizeof (MpegTSBaseStream);
base->mode = BASE_MODE_STREAMING;
+ base->seen_pat = FALSE;
base->first_pat_offset = -1;
}
const GValue *value;
MpegTSBaseClass *klass = GST_MPEGTS_BASE_GET_CLASS (base);
- if (G_UNLIKELY (base->first_pat_offset == -1)) {
+ if (G_UNLIKELY (base->seen_pat == FALSE)) {
GST_WARNING ("Got pmt without pat first. Returning");
/* remove the stream since we won't get another PMT otherwise */
mpegts_packetizer_remove_stream (base->packetizer, pmt_pid);
structure = mpegts_packetizer_parse_pat (base->packetizer, section);
if (G_LIKELY (structure)) {
mpegts_base_apply_pat (base, structure);
- if (base->first_pat_offset == -1) {
+ if (base->seen_pat == FALSE) {
base->first_pat_offset = GST_BUFFER_OFFSET (section->buffer);
GST_DEBUG ("First PAT offset: %" G_GUINT64_FORMAT,
* by subclasses if they have their own MpegTSBaseStream subclasses */
gsize stream_size;
+ /* Whether we saw a PAT yet */
+ gboolean seen_pat;
+
/*Offset from the origin to the first PAT (pullmode) */
guint64 first_pat_offset;
};