From 6c84f4e743441f3103f88212978c68f29537ee3b Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Wed, 13 Jul 2016 18:29:52 +0900 Subject: [PATCH] Revert "vorbisenc: push an updated segment stop time when we know it" This reverts commit a16cd5d2a5cbdf084163ead68b59d537d7db99f7. Setting the stop time on the segment breaks reconfiguration, as the encoder signals an EOS, but we reconfigure it an continue to produce buffers. This information should not be required via the segment downstream since we already have the sample count being used to generate buffer durations. https://bugzilla.gnome.org/show_bug.cgi?id=768763 --- ext/vorbis/gstvorbisenc.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/ext/vorbis/gstvorbisenc.c b/ext/vorbis/gstvorbisenc.c index 1ac9d83..57f193f 100644 --- a/ext/vorbis/gstvorbisenc.c +++ b/ext/vorbis/gstvorbisenc.c @@ -775,27 +775,6 @@ gst_vorbis_enc_output_buffers (GstVorbisEnc * vorbisenc) while (vorbis_bitrate_flushpacket (&vorbisenc->vd, &op)) { GstBuffer *buf; - if (op.e_o_s) { - GstAudioEncoder *enc = GST_AUDIO_ENCODER (vorbisenc); - GstClockTime duration; - - GST_DEBUG_OBJECT (vorbisenc, "Got EOS packet from libvorbis"); - GST_AUDIO_ENCODER_STREAM_LOCK (enc); - if (!GST_CLOCK_TIME_IS_VALID (enc->output_segment.stop)) { - GST_DEBUG_OBJECT (vorbisenc, - "Output segment has no end time, setting"); - duration = - gst_util_uint64_scale (op.granulepos, GST_SECOND, - vorbisenc->frequency); - enc->output_segment.stop = enc->output_segment.start + duration; - GST_DEBUG_OBJECT (enc, "new output segment %" GST_SEGMENT_FORMAT, - &enc->output_segment); - gst_pad_push_event (GST_AUDIO_ENCODER_SRC_PAD (enc), - gst_event_new_segment (&enc->output_segment)); - } - GST_AUDIO_ENCODER_STREAM_UNLOCK (enc); - } - GST_LOG_OBJECT (vorbisenc, "pushing out a data packet"); buf = gst_audio_encoder_allocate_output_buffer (GST_AUDIO_ENCODER -- 2.7.4