mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-10 10:04:23 +00:00
sbcdec: Require caps to be set before any data processing
This commit is contained in:
parent
e83a9b62e7
commit
c635cb233f
1 changed files with 2 additions and 3 deletions
|
@ -75,9 +75,6 @@ gst_sbc_dec_handle_frame (GstAudioDecoder * audio_dec, GstBuffer * buf)
|
|||
if (G_UNLIKELY (buf == NULL))
|
||||
return GST_FLOW_OK;
|
||||
|
||||
if (G_UNLIKELY (dec->frame_len == 0))
|
||||
return GST_FLOW_NOT_NEGOTIATED;
|
||||
|
||||
gst_buffer_map (buf, &in_map, GST_MAP_READ);
|
||||
|
||||
if (G_UNLIKELY (in_map.size == 0))
|
||||
|
@ -238,6 +235,8 @@ gst_sbc_dec_class_init (GstSbcDecClass * klass)
|
|||
static void
|
||||
gst_sbc_dec_init (GstSbcDec * dec)
|
||||
{
|
||||
gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE);
|
||||
|
||||
dec->samples_per_frame = 0;
|
||||
dec->frame_len = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue