audio: don't use GST_PTR_FORMAT for segments

Avoids crashes with debugging output enabled.
This commit is contained in:
Tim-Philipp Müller 2011-09-30 10:54:26 +01:00
parent bf57108e6a
commit 6ec5fc8d95
2 changed files with 7 additions and 5 deletions

View file

@ -580,7 +580,7 @@ gst_audio_decoder_setup (GstAudioDecoder * dec)
gst_query_unref (query); gst_query_unref (query);
/* normalize to bool */ /* normalize to bool */
dec->priv->agg = !!res; dec->priv->agg = ! !res;
} }
/* mini aggregator combining output buffers into fewer larger ones, /* mini aggregator combining output buffers into fewer larger ones,
@ -1353,10 +1353,11 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
gst_event_copy_segment (event, &seg); gst_event_copy_segment (event, &seg);
if (seg.format == GST_FORMAT_TIME) { if (seg.format == GST_FORMAT_TIME) {
GST_DEBUG_OBJECT (dec, "received TIME SEGMENT %" GST_PTR_FORMAT, &seg); GST_DEBUG_OBJECT (dec, "received TIME SEGMENT %" GST_SEGMENT_FORMAT,
&seg);
} else { } else {
gint64 nstart; gint64 nstart;
GST_DEBUG_OBJECT (dec, "received SEGMENT %" GST_PTR_FORMAT, &seg); GST_DEBUG_OBJECT (dec, "received SEGMENT %" GST_SEGMENT_FORMAT, &seg);
/* handle newsegment resulting from legacy simple seeking */ /* handle newsegment resulting from legacy simple seeking */
/* note that we need to convert this whether or not enough data /* note that we need to convert this whether or not enough data
* to handle initial newsegment */ * to handle initial newsegment */

View file

@ -1227,9 +1227,10 @@ gst_audio_encoder_sink_eventfunc (GstAudioEncoder * enc, GstEvent * event)
gst_event_copy_segment (event, &seg); gst_event_copy_segment (event, &seg);
if (seg.format == GST_FORMAT_TIME) { if (seg.format == GST_FORMAT_TIME) {
GST_DEBUG_OBJECT (enc, "received TIME SEGMENT %" GST_PTR_FORMAT, &seg); GST_DEBUG_OBJECT (enc, "received TIME SEGMENT %" GST_SEGMENT_FORMAT,
&seg);
} else { } else {
GST_DEBUG_OBJECT (enc, "received SEGMENT %" GST_PTR_FORMAT, &seg); GST_DEBUG_OBJECT (enc, "received SEGMENT %" GST_SEGMENT_FORMAT, &seg);
GST_DEBUG_OBJECT (enc, "unsupported format; ignoring"); GST_DEBUG_OBJECT (enc, "unsupported format; ignoring");
break; break;
} }