summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorArnaud Vrac <avrac@freebox.fr>2012-09-02 20:19:17 +0200
committerEdward Hervey <edward.hervey@collabora.co.uk>2012-09-14 09:14:26 +0200
commit0331fb6203ecbe60230296ddf20e70d61e00eb7f (patch)
tree677e407311282fc8b57f04dbd658e028902c5a1e /gst-libs
parentaf379b0b8ea446a043fc689add749cdfc827a0a6 (diff)
downloadgstreamer-plugins-bad-0331fb6203ecbe60230296ddf20e70d61e00eb7f.tar.gz
mpeg4parser: parse complexity estimation header in video object layer
https://bugzilla.gnome.org/show_bug.cgi?id=683254
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecparsers/gstmpeg4parser.c36
1 files changed, 29 insertions, 7 deletions
diff --git a/gst-libs/gst/codecparsers/gstmpeg4parser.c b/gst-libs/gst/codecparsers/gstmpeg4parser.c
index 824927ff4..d9622c9c2 100644
--- a/gst-libs/gst/codecparsers/gstmpeg4parser.c
+++ b/gst-libs/gst/codecparsers/gstmpeg4parser.c
@@ -1161,9 +1161,35 @@ gst_mpeg4_parse_video_object_layer (GstMpeg4VideoObjectLayer * vol,
READ_UINT8 (&br, vol->quarter_sample, 1);
READ_UINT8 (&br, vol->complexity_estimation_disable, 1);
- if (!vol->complexity_estimation_disable)
- goto complexity_estimation_error;
-
+ if (!vol->complexity_estimation_disable) {
+ guint8 estimation_method;
+ guint8 estimation_disable;
+
+ /* skip unneeded properties */
+ READ_UINT8 (&br, estimation_method, 2);
+ if (estimation_method < 2) {
+ READ_UINT8 (&br, estimation_disable, 1);
+ if (!estimation_disable)
+ SKIP (&br, 6);
+ READ_UINT8 (&br, estimation_disable, 1);
+ if (!estimation_disable)
+ SKIP (&br, 4);
+ CHECK_MARKER (&br);
+ READ_UINT8 (&br, estimation_disable, 1);
+ if (!estimation_disable)
+ SKIP (&br, 4);
+ READ_UINT8 (&br, estimation_disable, 1);
+ if (!estimation_disable)
+ SKIP (&br, 6);
+ CHECK_MARKER (&br);
+
+ if (estimation_method == 1) {
+ READ_UINT8 (&br, estimation_disable, 1);
+ if (!estimation_disable)
+ SKIP (&br, 2);
+ }
+ }
+ }
READ_UINT8 (&br, vol->resync_marker_disable, 1);
READ_UINT8 (&br, vol->data_partitioned, 1);
@@ -1202,10 +1228,6 @@ failed:
wrong_start_code:
GST_WARNING ("got buffer with wrong start code");
goto failed;
-
-complexity_estimation_error:
- GST_WARNING ("don't support complexity estimation");
- goto failed;
}
/**