From: Stefan Kost Date: Mon, 26 Nov 2007 12:26:20 +0000 (+0000) Subject: gst/level/gstlevel.c: Add GAP-flag support. X-Git-Tag: RELEASE-0_10_7~166 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d37e93af90082a0b30640bc278bb11994fa63636;p=platform%2Fupstream%2Fgst-plugins-good.git gst/level/gstlevel.c: Add GAP-flag support. Original commit message from CVS: * gst/level/gstlevel.c: Add GAP-flag support. --- diff --git a/ChangeLog b/ChangeLog index 52f1536..d02b12d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-26 Stefan Kost + + * gst/level/gstlevel.c: + Add GAP-flag support. + 2007-11-26 Edward Hervey * gst/rtp/gstrtph263depay.c: (gst_rtp_h263_depay_process): diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c index 2a499a3..f3e1cb6 100644 --- a/gst/level/gstlevel.c +++ b/gst/level/gstlevel.c @@ -523,12 +523,16 @@ gst_level_transform_ip (GstBaseTransform * trans, GstBuffer * in) num_frames = num_int_samples / filter->channels; for (i = 0; i < filter->channels; ++i) { - filter->process (in_data, num_int_samples, filter->channels, &CS, - &filter->peak[i]); - GST_LOG_OBJECT (filter, - "channel %d, cumulative sum %f, peak %f, over %d samples/%d channels", - i, CS, filter->peak[i], num_int_samples, filter->channels); - filter->CS[i] += CS; + if (!GST_BUFFER_FLAG_IS_SET (in, GST_BUFFER_FLAG_GAP)) { + filter->process (in_data, num_int_samples, filter->channels, &CS, + &filter->peak[i]); + GST_LOG_OBJECT (filter, + "channel %d, cumulative sum %f, peak %f, over %d samples/%d channels", + i, CS, filter->peak[i], num_int_samples, filter->channels); + filter->CS[i] += CS; + } else { + filter->peak[i] = 0.0; + } in_data += (filter->width / 8); filter->decay_peak_age[i] +=