summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Zanelli <aurelien.zanelli@parrot.com>2014-09-16 15:59:58 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-09-19 11:38:38 +0300
commit747402269c7bc4786d3b67f5209f3125b9166b3e (patch)
tree007ef9287d32c5a73c91f0ec2b5029ecef448774
parentf4853c4bcc1487a06f1c5818482476cb7d30a36c (diff)
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
-rw-r--r--gst/videoparsers/gstvc1parse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gst/videoparsers/gstvc1parse.c b/gst/videoparsers/gstvc1parse.c
index c56b74b536..8424280194 100644
--- a/gst/videoparsers/gstvc1parse.c
+++ b/gst/videoparsers/gstvc1parse.c
@@ -455,8 +455,8 @@ gst_vc1_parse_detect (GstBaseParse * parse, GstBuffer * buffer)
#endif
while (size >= 40) {
- if (data[3] == 0xc5 && GST_READ_UINT32_BE (data + 4) == 0x00000004 &&
- GST_READ_UINT32_BE (data + 20) == 0x0000000c) {
+ if (data[3] == 0xc5 && GST_READ_UINT32_LE (data + 4) == 0x00000004 &&
+ GST_READ_UINT32_LE (data + 20) == 0x0000000c) {
guint32 startcode;
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
|| vc1parse->input_stream_format ==
VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER)) {
- if (data[3] == 0xc5 && GST_READ_UINT32_BE (data + 4) == 0x00000004
- && GST_READ_UINT32_BE (data + 20) == 0x0000000c) {
+ if (data[3] == 0xc5 && GST_READ_UINT32_LE (data + 4) == 0x00000004
+ && GST_READ_UINT32_LE (data + 20) == 0x0000000c) {
framesize = 36;
} else {
*skipsize = 1;
@@ -1050,7 +1050,7 @@ gst_vc1_parse_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
/* frame-layer or sequence-layer-frame-layer */
g_assert (size >= 8);
/* Parse frame layer size */
- framesize = GST_READ_UINT24_BE (data + 1) + 8;
+ framesize = GST_READ_UINT24_LE (data + 1) + 8;
}