oggdemux: minor cleanup

This commit is contained in:
Vincent Penquerc'h 2011-10-24 11:46:05 +01:00
parent 44ec58b41b
commit a5c64d5b97

View file

@ -484,6 +484,9 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet,
cret = GST_FLOW_OK; cret = GST_FLOW_OK;
GST_DEBUG_OBJECT (pad, "Chaining %d %d %" GST_TIME_FORMAT " %d %p",
ogg->pullmode, ogg->push_state, GST_TIME_ARGS (ogg->push_time_length),
ogg->push_disable_seeking, ogg->building_chain);
GST_PUSH_LOCK (ogg); GST_PUSH_LOCK (ogg);
if (!ogg->pullmode && ogg->push_state == PUSH_PLAYING if (!ogg->pullmode && ogg->push_state == PUSH_PLAYING
&& ogg->push_time_length == GST_CLOCK_TIME_NONE && ogg->push_time_length == GST_CLOCK_TIME_NONE
@ -1336,15 +1339,18 @@ gst_ogg_demux_estimate_seek_quality (GstOggDemux * ogg)
static void static void
gst_ogg_demux_update_bisection_stats (GstOggDemux * ogg) gst_ogg_demux_update_bisection_stats (GstOggDemux * ogg)
{ {
int n;
GST_INFO_OBJECT (ogg, "Bisection needed %d + %d steps", GST_INFO_OBJECT (ogg, "Bisection needed %d + %d steps",
ogg->push_bisection_steps[0], ogg->push_bisection_steps[1]); ogg->push_bisection_steps[0], ogg->push_bisection_steps[1]);
ogg->stats_bisection_steps[0] += ogg->push_bisection_steps[0];
ogg->stats_bisection_steps[1] += ogg->push_bisection_steps[1]; for (n = 0; n < 2; ++n) {
if (ogg->stats_bisection_max_steps[0] < ogg->push_bisection_steps[0]) ogg->stats_bisection_steps[n] += ogg->push_bisection_steps[n];
ogg->stats_bisection_max_steps[0] = ogg->push_bisection_steps[0]; if (ogg->stats_bisection_max_steps[n] < ogg->push_bisection_steps[n])
if (ogg->stats_bisection_max_steps[1] < ogg->push_bisection_steps[1]) ogg->stats_bisection_max_steps[n] = ogg->push_bisection_steps[n];
ogg->stats_bisection_max_steps[1] = ogg->push_bisection_steps[1]; }
ogg->stats_nbisections++; ogg->stats_nbisections++;
GST_INFO_OBJECT (ogg, GST_INFO_OBJECT (ogg,
"So far, %.2f + %.2f bisections needed per seek (max %d + %d)", "So far, %.2f + %.2f bisections needed per seek (max %d + %d)",
ogg->stats_bisection_steps[0] / (float) ogg->stats_nbisections, ogg->stats_bisection_steps[0] / (float) ogg->stats_nbisections,