[Bug 758651] Fail to play MPEG2 video clip in file container format MPEG-PS in manual gst command pipeline
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Jun 9 01:52:04 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=758651
--- Comment #10 from Austin Yuan <shengquan.yuan at intel.com> ---
Bellow is MPEG2PS spec and MPEG1PS spec for the pack_header syntax:
ISO13818-1:
pack_header() {
pack_start_code 32 bslbf
'01' 2 bslbf
system_clock_reference_base [32..30] 3 bslbf
marker_bit 1 bslbf
........
}
ISO11172-1
pack() {
pack_start_code 32 bslbf
'0010' 4 bslbf
system_clock_reference [32..30] 3 bslbf
marker_bit 1 bslbf
...........
}
mpegdemux gstmpegdemux.c:gst_ps_demux_parse_pack_start follows above spec:
static GstFlowReturn
gst_ps_demux_parse_pack_start (GstPsDemux * demux)
{
...........
/* skip start code */
data += 4;
...........
/* start parsing the stream */
if ((*data & 0xc0) == 0x40) {
guint32 scr_ext;
guint32 next32;
guint8 stuffing_bytes;
GST_LOG ("Found MPEG2 stream");
demux->is_mpeg2_pack = TRUE;
...........
} else {
GST_DEBUG ("Found MPEG1 stream");
demux->is_mpeg2_pack = FALSE;
/* check markers */
if (G_UNLIKELY ((scr1 & 0xf1000100) != 0x21000100))
goto lost_sync;
...........
}
...........
}
Check the clip, it will fall into gstmpegdemux.c:gst_ps_demux_parse_pack_start
MPEG1 code path according to ISO13818-1/ISO11172-1:
hexdump -C Gonegirl_640x320_6mbps_30fps_Main at High.mpg
00000000 00 00 01 ba 21 00 01 00 01 80 7b 3f 00 00 01 bb |....!.....{?....|
00000010 00 09 80 7b 3f 00 21 ff e0 e0 e6 00 00 01 e0 07 |...{?.!.........|
00000020 df 31 00 03 77 01 11 00 03 5f 91 00 00 01 b3 28 |.1..w...._.....(|
00000030 01 40 15 0e a6 23 80 00 00 01 b5 14 4a 00 01 00 |. at ...#......J...|
00000040 00 00 00 01 b8 00 08 00 40 00 00 01 00 00 0a 84 |........ at .......|
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list