From: Vincent Penquerc'h Date: Mon, 29 May 2017 12:44:01 +0000 (+0100) Subject: oggdemux: fix artifacts at chain boundaries X-Git-Tag: 1.19.3~511^2~2220 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb0abf85587a4ef23937928fbd5d550cf1f73e99;p=platform%2Fupstream%2Fgstreamer.git oggdemux: fix artifacts at chain boundaries https://bugzilla.gnome.org/show_bug.cgi?id=782132 --- diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 6825f89..db3138c 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -791,8 +791,9 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, if (pad->map.audio_clipping && (clip_start || clip_end)) { GST_DEBUG_OBJECT (pad, - "Adding audio clipping %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT, - clip_start, clip_end); + "Clipping %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " (%" + G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT ")", clip_start, clip_end, + clip_start + clip_end, duration); gst_buffer_add_audio_clipping_meta (buf, GST_FORMAT_DEFAULT, clip_start, clip_end); } @@ -4244,7 +4245,8 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain) chain->segment_stop = GST_CLOCK_TIME_NONE; } - GST_INFO ("segment stop %" G_GUINT64_FORMAT, chain->segment_stop); + GST_INFO ("segment stop %" G_GUINT64_FORMAT ", for last granule %" + G_GUINT64_FORMAT, chain->segment_stop, last_granule); return GST_FLOW_OK; } diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index 042f102..4ace481 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -2033,10 +2033,7 @@ granulepos_to_granule_opus (GstOggStream * pad, gint64 granulepos) if (pad->first_granpos < 0 || granulepos < pad->first_granpos) pad->first_granpos = granulepos; - if (granulepos < -pad->granule_offset) - return 0; - - return granulepos + pad->granule_offset; + return granulepos; } static gint64