ext/faad/gstfaad.c: Add debug category, remove Close() call that made it crash whenever reusing, renegotiating or any...

Original commit message from CVS:
* ext/faad/gstfaad.c: (gst_faad_class_init), (gst_faad_setcaps):
Add debug category, remove Close() call that made it crash
whenever reusing, renegotiating or anything; Close() actually
free()s the handle and should only be called on READY->NULL.
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header):
Actually set caps on buffer (in addition to pad), also.
This commit is contained in:
Ronald S. Bultje 2005-08-10 09:33:58 +00:00
parent a48b14eb37
commit 0ea3b5b953
3 changed files with 17 additions and 7 deletions

View file

@ -1,3 +1,12 @@
2005-08-10 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/faad/gstfaad.c: (gst_faad_class_init), (gst_faad_setcaps):
Add debug category, remove Close() call that made it crash
whenever reusing, renegotiating or anything; Close() actually
free()s the handle and should only be called on READY->NULL.
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header):
Actually set caps on buffer (in addition to pad), also.
2005-08-10 Owen Fraser-Green <owen@discobabe.net> 2005-08-10 Owen Fraser-Green <owen@discobabe.net>
* gst/realmedia/rmdemux.c (gst_rmdemux_sink_activate) * gst/realmedia/rmdemux.c (gst_rmdemux_sink_activate)

View file

@ -25,6 +25,9 @@
#include <gst/audio/multichannel.h> #include <gst/audio/multichannel.h>
#include "gstfaad.h" #include "gstfaad.h"
GST_DEBUG_CATEGORY_STATIC (faad_debug);
#define GST_CAT_DEFAULT faad_debug
static GstElementDetails faad_details = { static GstElementDetails faad_details = {
"Free AAC Decoder (FAAD)", "Free AAC Decoder (FAAD)",
"Codec/Decoder/Audio", "Codec/Decoder/Audio",
@ -141,6 +144,8 @@ gst_faad_class_init (GstFaadClass * klass)
parent_class = g_type_class_peek_parent (klass); parent_class = g_type_class_peek_parent (klass);
gstelement_class->change_state = gst_faad_change_state; gstelement_class->change_state = gst_faad_change_state;
GST_DEBUG_CATEGORY_INIT (faad_debug, "faad", 0, "AAC decoding");
} }
static void static void
@ -191,12 +196,7 @@ gst_faad_setcaps (GstPad * pad, GstCaps * caps)
/* We have codec data, means packetised stream */ /* We have codec data, means packetised stream */
faad->packetised = TRUE; faad->packetised = TRUE;
buf = g_value_get_boxed (value); buf = GST_BUFFER (gst_value_get_mini_object (value));
if (faad->handle) {
GST_DEBUG ("faad handle already open; closing before re-initing");
faacDecClose (faad->handle);
}
/* someone forgot that char can be unsigned when writing the API */ /* someone forgot that char can be unsigned when writing the API */
if ((gint8) faacDecInit2 (faad->handle, GST_BUFFER_DATA (buf), if ((gint8) faacDecInit2 (faad->handle, GST_BUFFER_DATA (buf),

View file

@ -678,8 +678,9 @@ gst_qtdemux_loop_header (GstPad * pad)
/* ? */ /* ? */
qtdemux->need_flush = FALSE; qtdemux->need_flush = FALSE;
} }
GST_DEBUG ("Pushing buf with time=%" GST_TIME_FORMAT "\n", GST_DEBUG ("Pushing buf with time=%" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
gst_buffer_set_caps (buf, stream->caps);
gst_pad_push (stream->pad, buf); gst_pad_push (stream->pad, buf);
GST_INFO ("pushing buffer on %" GST_PTR_FORMAT, stream->pad); GST_INFO ("pushing buffer on %" GST_PTR_FORMAT, stream->pad);