a52dec: check that a52_init returns a valid a52 state
This commit is contained in:
parent
d55d4054bd
commit
24fca6cde5
@ -248,6 +248,13 @@ gst_a52dec_start (GstAudioDecoder * dec)
|
|||||||
|
|
||||||
klass = GST_A52DEC_CLASS (G_OBJECT_GET_CLASS (a52dec));
|
klass = GST_A52DEC_CLASS (G_OBJECT_GET_CLASS (a52dec));
|
||||||
a52dec->state = a52_init (klass->a52_cpuflags);
|
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->samples = a52_samples (a52dec->state);
|
||||||
a52dec->bit_rate = -1;
|
a52dec->bit_rate = -1;
|
||||||
a52dec->sample_rate = -1;
|
a52dec->sample_rate = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user