audioringbuffer: do not require 4 byte multiple for encoded MPEG

Bytes per frame doesn't make sense for encoded audio.

https://bugzilla.gnome.org/show_bug.cgi?id=776038
This commit is contained in:
Vincent Penquerc'h 2016-12-13 09:44:09 +00:00
parent c4929b8647
commit 6ee5922f2f

View file

@ -277,7 +277,7 @@ gst_audio_ring_buffer_parse_caps (GstAudioRingBufferSpec * spec, GstCaps * caps)
gst_structure_get_int (structure, "channels", &info.channels);
spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG;
info.bpf = 4;
info.bpf = 1;
} else if (g_str_equal (mimetype, "audio/mpeg") &&
gst_structure_get_int (structure, "mpegversion", &i) &&
(i == 2 || i == 4) &&
@ -290,7 +290,7 @@ gst_audio_ring_buffer_parse_caps (GstAudioRingBufferSpec * spec, GstCaps * caps)
gst_structure_get_int (structure, "channels", &info.channels);
spec->type = (i == 2) ? GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC :
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC;
info.bpf = 4;
info.bpf = 1;
} else {
goto parse_error;
}