opusparse: initialize sample rate to a default

sample_rate might be used uninitialized if !sink_caps is TRUE. Initialize
it to the default used in gst_codec_utils_opus_parse_caps () when there is
no rate defined in the caps.

CID 1338695
This commit is contained in:
Luis de Bethencourt 2015-11-12 11:23:31 +00:00
parent 550ecade4d
commit 7c495b711e

View file

@ -386,7 +386,7 @@ gst_opus_parse_parse_frame (GstBaseParse * base, GstBaseParseFrame * frame)
parse->comment_header);
} else {
GstCaps *sink_caps;
guint32 sample_rate;
guint32 sample_rate = 48000;
guint8 n_channels, n_streams, n_stereo_streams, channel_mapping_family;
guint8 channel_mapping[256];
GstBuffer *id_header;