summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-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;
}