mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +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[1] = 0;
|
||||
|
||||
if (faad->packetised) {
|
||||
if (faad->packetised && !faad->init) {
|
||||
gint rate, channels;
|
||||
|
||||
if (gst_structure_get_int (str, "rate", &rate) &&
|
||||
|
@ -1096,11 +1096,6 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
info.bytesconsumed = input_size;
|
||||
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) {
|
||||
|
||||
if (faad->packetised) {
|
||||
|
@ -1133,6 +1128,9 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
/* ok again */
|
||||
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)
|
||||
info.bytesconsumed = input_size;
|
||||
|
||||
|
@ -1152,8 +1150,6 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
guint bufsize = info.samples * faad->bps;
|
||||
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 */
|
||||
ret =
|
||||
gst_pad_alloc_buffer_and_set_caps (faad->srcpad, 0, bufsize,
|
||||
|
|
Loading…
Reference in a new issue