summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7551d10)
raw | patch | inline | side by side (parent: 7551d10)
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | |
Mon, 7 Feb 2011 18:58:45 +0000 (19:58 +0100) | ||
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | |
Mon, 7 Feb 2011 19:02:08 +0000 (20:02 +0100) |
Skip 1 byte indicating invalid frame type index rather than stalling
on it indefinitely until EOS.
Fixes #639715.
on it indefinitely until EOS.
Fixes #639715.
ext/amrwbdec/amrwbdec.c | patch | blob | history |
index bbaf33be8ac4bfb2f1a6ae927becb0be27d5f6b0..51f759d8550cc4a0d6446142cbafa61dd3b3f8e9 100644 (file)
--- a/ext/amrwbdec/amrwbdec.c
+++ b/ext/amrwbdec/amrwbdec.c
static const unsigned char block_size[16] =
{ 18, 24, 33, 37, 41, 47, 51, 59, 61,
- 6, 6, 0, 0, 0, 1, 1
+ 6, 0, 0, 0, 0, 1, 1
};
static gboolean gst_amrwbdec_event (GstPad * pad, GstEvent * event);
GST_DEBUG_OBJECT (amrwbdec, "mode %d, block %d", mode, block);
- if (!block || gst_adapter_available (amrwbdec->adapter) < block)
+ if (!block) {
+ GST_LOG_OBJECT (amrwbdec, "skipping byte");
+ gst_adapter_flush (amrwbdec->adapter, 1);
+ continue;
+ }
+
+ if (gst_adapter_available (amrwbdec->adapter) < block)
break;
/* the library seems to write into the source data, hence the copy. */