vc1parse: fix sequence-layer/frame-layer endianness
Sequence-layer and frame-layer are serialized in little-endian byte order except for STRUCT_C and framedata fields as described in SMPTE 421M Annex L. https://bugzilla.gnome.org/show_bug.cgi?id=736750
This commit is contained in:
parent
7fa9bbc3b0
commit
d2847eaa09
@ -455,8 +455,8 @@ gst_vc1_parse_detect (GstBaseParse * parse, GstBuffer * buffer)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (size >= 40) {
|
while (size >= 40) {
|
||||||
if (data[3] == 0xc5 && GST_READ_UINT32_BE (data + 4) == 0x00000004 &&
|
if (data[3] == 0xc5 && GST_READ_UINT32_LE (data + 4) == 0x00000004 &&
|
||||||
GST_READ_UINT32_BE (data + 20) == 0x0000000c) {
|
GST_READ_UINT32_LE (data + 20) == 0x0000000c) {
|
||||||
guint32 startcode;
|
guint32 startcode;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (vc1parse, "Found sequence layer");
|
GST_DEBUG_OBJECT (vc1parse, "Found sequence layer");
|
||||||
@ -981,8 +981,8 @@ gst_vc1_parse_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
|
|||||||
VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME
|
VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME
|
||||||
|| vc1parse->input_stream_format ==
|
|| vc1parse->input_stream_format ==
|
||||||
VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER)) {
|
VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER)) {
|
||||||
if (data[3] == 0xc5 && GST_READ_UINT32_BE (data + 4) == 0x00000004
|
if (data[3] == 0xc5 && GST_READ_UINT32_LE (data + 4) == 0x00000004
|
||||||
&& GST_READ_UINT32_BE (data + 20) == 0x0000000c) {
|
&& GST_READ_UINT32_LE (data + 20) == 0x0000000c) {
|
||||||
framesize = 36;
|
framesize = 36;
|
||||||
} else {
|
} else {
|
||||||
*skipsize = 1;
|
*skipsize = 1;
|
||||||
@ -1050,7 +1050,7 @@ gst_vc1_parse_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
|
|||||||
/* frame-layer or sequence-layer-frame-layer */
|
/* frame-layer or sequence-layer-frame-layer */
|
||||||
g_assert (size >= 8);
|
g_assert (size >= 8);
|
||||||
/* Parse frame layer size */
|
/* Parse frame layer size */
|
||||||
framesize = GST_READ_UINT24_BE (data + 1) + 8;
|
framesize = GST_READ_UINT24_LE (data + 1) + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user