mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
a52dec: check that a52_init returns a valid a52 state
This commit is contained in:
parent
d55d4054bd
commit
24fca6cde5
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue