oggdemux: fix artifacts at chain boundaries
https://bugzilla.gnome.org/show_bug.cgi?id=782132
This commit is contained in:
parent
62df7fdaba
commit
bb0abf8558
@ -791,8 +791,9 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet,
|
|||||||
|
|
||||||
if (pad->map.audio_clipping && (clip_start || clip_end)) {
|
if (pad->map.audio_clipping && (clip_start || clip_end)) {
|
||||||
GST_DEBUG_OBJECT (pad,
|
GST_DEBUG_OBJECT (pad,
|
||||||
"Adding audio clipping %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT,
|
"Clipping %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " (%"
|
||||||
clip_start, clip_end);
|
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,
|
gst_buffer_add_audio_clipping_meta (buf, GST_FORMAT_DEFAULT, clip_start,
|
||||||
clip_end);
|
clip_end);
|
||||||
}
|
}
|
||||||
@ -4244,7 +4245,8 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain)
|
|||||||
chain->segment_stop = GST_CLOCK_TIME_NONE;
|
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;
|
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)
|
if (pad->first_granpos < 0 || granulepos < pad->first_granpos)
|
||||||
pad->first_granpos = granulepos;
|
pad->first_granpos = granulepos;
|
||||||
|
|
||||||
if (granulepos < -pad->granule_offset)
|
return granulepos;
|
||||||
return 0;
|
|
||||||
|
|
||||||
return granulepos + pad->granule_offset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint64
|
static gint64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user