mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
oggdemux: fix artifacts at chain boundaries
https://bugzilla.gnome.org/show_bug.cgi?id=782132
This commit is contained in:
parent
62df7fdaba
commit
bb0abf8558
2 changed files with 6 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue