summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-07-07 19:15:42 +0100
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-07-07 19:21:45 +0100
commitf410614403c56dbfc833119d7ad6f0c38f1fabd8 (patch)
tree5cbcf47b9e8cc0a343def34a5e395ea569c8f742
parent316236761c6fd3063471e9cab267a11d0466dfa2 (diff)
downloadgst-plugins-bad-f410614403c56dbfc833119d7ad6f0c38f1fabd8.tar.gz
gst-plugins-bad-f410614403c56dbfc833119d7ad6f0c38f1fabd8.tar.bz2
gst-plugins-bad-f410614403c56dbfc833119d7ad6f0c38f1fabd8.zip
mimdec: Ignore pause frames
-rw-r--r--ext/mimic/gstmimdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c
index c7f1ec87..1579bd41 100644
--- a/ext/mimic/gstmimdec.c
+++ b/ext/mimic/gstmimdec.c
@@ -172,7 +172,7 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
(mimdec->have_header ? mimdec->payload_size : 24)) {
if (!mimdec->have_header) {
header = (guchar *) gst_adapter_peek (mimdec->adapter, 24);
- header_size = GUINT16_FROM_LE (*(guint16 *) (header + 0));
+ header_size = header[0];
if (header_size != 24) {
GST_WARNING_OBJECT (mimdec,
"invalid frame: header size %d incorrect", header_size);
@@ -201,6 +201,12 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
mimdec->have_header = TRUE;
}
+ /* Check if its paused frame, drop it */
+ if (mimdec->payload_size == 0) {
+ mimdec->have_header = FALSE;
+ continue;
+ }
+
if (gst_adapter_available (mimdec->adapter) < mimdec->payload_size) {
goto out;
}