vorbisdec: Reset decoder in more situations
authorEdward Hervey <edward@centricular.com>
Fri, 3 Mar 2017 09:52:15 +0000 (10:52 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 3 Mar 2017 09:56:22 +0000 (10:56 +0100)
commite575be6dc6689950299049928ad135e456aa07a2
tree6257404c1f637b3e88f8b87c0207743ae800591a
parent6eef6bd1f5a52e500d484eded78d76943c941293
vorbisdec: Reset decoder in more situations

This is a followup commit to b95725c37e70ad3c1ec8dadb401388db375df482

* Resetting the decoder should only happen when we get a new initialization
header (0x01) and not on the other headers
* The initialized variable only gets set to TRUE once all headers have
been parsed. Also check if the vorbis_info struct has been properly resetted
also. Failure to do that would cause vorbisdec to error if it got
two initialization header in a row (the first would configure the underlying
library and the second one would error out because it's already initialized)

https://bugzilla.gnome.org/show_bug.cgi?id=779515
ext/vorbis/gstvorbisdec.c