summaryrefslogtreecommitdiff
path: root/ext/vorbis/gstvorbisdec.h
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2018-02-13 08:36:30 +0100
committerEdward Hervey <bilboed@bilboed.com>2018-02-13 09:02:46 +0100
commit865209d3afeff82f629bf4bf293fce9cc40df53b (patch)
tree7465d02fde36a8849ba34a765c493af80a01b15f /ext/vorbis/gstvorbisdec.h
parentfc4187977b26b80127ce07a36bf838a97b228284 (diff)
downloadgstreamer-plugins-base-865209d3afeff82f629bf4bf293fce9cc40df53b.tar.gz
vorbisdec: Improve "new headers while initialized" handling
If new headers arrive after we are initialized, we need to make sure that they are indeed valid. A vorbis bitstream always begins with three header packets and must be in order. Also some streams have unframed (invalid?) headers that might confuse and disrupt the decoding process. Therefore if ever we see new headers, we accumulate them and once we get a non-header packet we check them to make sure that: * We have at least 3 headers * They are the expected ones (identification, comments and setup) * They are in order * Any other "header" is ignored If those conditions are met, we reset and reconfigure the decoder https://bugzilla.gnome.org/show_bug.cgi?id=784530
Diffstat (limited to 'ext/vorbis/gstvorbisdec.h')
-rw-r--r--ext/vorbis/gstvorbisdec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/vorbis/gstvorbisdec.h b/ext/vorbis/gstvorbisdec.h
index 78d275fda..917d9046c 100644
--- a/ext/vorbis/gstvorbisdec.h
+++ b/ext/vorbis/gstvorbisdec.h
@@ -65,6 +65,8 @@ struct _GstVorbisDec {
GstAudioInfo info;
CopySampleFunc copy_samples;
+
+ GList *pending_headers;
};
struct _GstVorbisDecClass {