projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d55d405
)
a52dec: check that a52_init returns a valid a52 state
author
Julien Isorce
<julien.isorce@gmail.com>
Tue, 20 Dec 2011 10:54:38 +0000
(11:54 +0100)
committer
Mark Nauwelaerts
<mark.nauwelaerts@collabora.co.uk>
Tue, 20 Dec 2011 11:45:52 +0000
(12:45 +0100)
ext/a52dec/gsta52dec.c
patch
|
blob
|
history
diff --git
a/ext/a52dec/gsta52dec.c
b/ext/a52dec/gsta52dec.c
index
ac1462e
..
5827f57
100644
(file)
--- a/
ext/a52dec/gsta52dec.c
+++ b/
ext/a52dec/gsta52dec.c
@@
-248,6
+248,13
@@
gst_a52dec_start (GstAudioDecoder * dec)
klass = GST_A52DEC_CLASS (G_OBJECT_GET_CLASS (a52dec));
a52dec->state = a52_init (klass->a52_cpuflags);
+
+ if (!a52dec->state) {
+ GST_ELEMENT_ERROR (GST_ELEMENT (a52dec), LIBRARY, INIT, (NULL),
+ ("failed to initialize a52 state"));
+ return FALSE;
+ }
+
a52dec->samples = a52_samples (a52dec->state);
a52dec->bit_rate = -1;
a52dec->sample_rate = -1;