mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
faad: remove some redundant code
... and move and modify some debug logging.
This commit is contained in:
parent
83f1b71613
commit
5a3ab64407
1 changed files with 4 additions and 8 deletions
|
@ -383,7 +383,7 @@ gst_faad_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
faad->fake_codec_data[0] = 0;
|
faad->fake_codec_data[0] = 0;
|
||||||
faad->fake_codec_data[1] = 0;
|
faad->fake_codec_data[1] = 0;
|
||||||
|
|
||||||
if (faad->packetised) {
|
if (faad->packetised && !faad->init) {
|
||||||
gint rate, channels;
|
gint rate, channels;
|
||||||
|
|
||||||
if (gst_structure_get_int (str, "rate", &rate) &&
|
if (gst_structure_get_int (str, "rate", &rate) &&
|
||||||
|
@ -1096,11 +1096,6 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
info.bytesconsumed = input_size;
|
info.bytesconsumed = input_size;
|
||||||
info.error = 0;
|
info.error = 0;
|
||||||
|
|
||||||
if (!faad->packetised) {
|
|
||||||
/* We must check that ourselves for raw stream */
|
|
||||||
run_loop = (input_size >= FAAD_MIN_STREAMSIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
while ((input_size > 0) && run_loop) {
|
while ((input_size > 0) && run_loop) {
|
||||||
|
|
||||||
if (faad->packetised) {
|
if (faad->packetised) {
|
||||||
|
@ -1133,6 +1128,9 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
/* ok again */
|
/* ok again */
|
||||||
faad->error_count = 0;
|
faad->error_count = 0;
|
||||||
|
|
||||||
|
GST_LOG_OBJECT (faad, "%d bytes consumed, %d samples decoded",
|
||||||
|
(guint) info.bytesconsumed, (guint) info.samples);
|
||||||
|
|
||||||
if (info.bytesconsumed > input_size)
|
if (info.bytesconsumed > input_size)
|
||||||
info.bytesconsumed = input_size;
|
info.bytesconsumed = input_size;
|
||||||
|
|
||||||
|
@ -1152,8 +1150,6 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
guint bufsize = info.samples * faad->bps;
|
guint bufsize = info.samples * faad->bps;
|
||||||
guint num_samples = info.samples / faad->channels;
|
guint num_samples = info.samples / faad->channels;
|
||||||
|
|
||||||
GST_LOG_OBJECT (faad, "decoded %d samples", (guint) info.samples);
|
|
||||||
|
|
||||||
/* note: info.samples is total samples, not per channel */
|
/* note: info.samples is total samples, not per channel */
|
||||||
ret =
|
ret =
|
||||||
gst_pad_alloc_buffer_and_set_caps (faad->srcpad, 0, bufsize,
|
gst_pad_alloc_buffer_and_set_caps (faad->srcpad, 0, bufsize,
|
||||||
|
|
Loading…
Reference in a new issue