hlsdemux: Fix checking adaptation_field_control field to parse pcr

The PCR_flag and PCR value is in adaptation_field, not in payload.
The MSB of adaptation_field_control is used as whether adaptation_
field is exist or not.

For the case(PCR in only adaptation_field without payload), we modify
checking condition about adaptation_field_control field.

https://bugzilla.gnome.org/show_bug.cgi?id=778731
This commit is contained in:
Dongil Park 2017-02-16 10:51:44 +09:00 committed by Jan Schmidt
parent 5bd4bc8080
commit ffbe690656

View file

@ -246,8 +246,8 @@ gst_hlsdemux_tsreader_find_pcrs_mpegts (GstHLSTSReader * r,
GST_LOG ("Found packet for PID %04x (PMT)", r->pmt_pid);
handle_pmt (r, p, size);
}
/* sync byte (0x47), error indicator (TEI) not set, has_payload */
else if ((hdr & 0xFF800010) == 0x47000010
/* sync byte (0x47), error indicator (TEI) not set, has_adaptation_field */
else if ((hdr & 0xFF800020) == 0x47000020
&& ((hdr >> 8) & 0x1fff) == r->pcr_pid) {
GST_LOG ("Found packet for PID %04x (PCR)", r->pcr_pid);
handle_pcr (r, p, size);