mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 00:28:21 +00:00
audiodecoder: set of base_ts for segment formats other than time
Fixes setting of converted segment start as base_ts when estimate rate is allowed.
This commit is contained in:
parent
e779002cfd
commit
d8d9f0db97
1 changed files with 4 additions and 2 deletions
|
@ -1650,11 +1650,13 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
|
|||
case GST_EVENT_SEGMENT:
|
||||
{
|
||||
GstSegment seg;
|
||||
GstFormat format;
|
||||
|
||||
GST_AUDIO_DECODER_STREAM_LOCK (dec);
|
||||
gst_event_copy_segment (event, &seg);
|
||||
|
||||
if (seg.format == GST_FORMAT_TIME) {
|
||||
format = seg.format;
|
||||
if (format == GST_FORMAT_TIME) {
|
||||
GST_DEBUG_OBJECT (dec, "received TIME SEGMENT %" GST_SEGMENT_FORMAT,
|
||||
&seg);
|
||||
} else {
|
||||
|
@ -1696,7 +1698,7 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
|
|||
/* and that's where we time from,
|
||||
* in case upstream does not come up with anything better
|
||||
* (e.g. upstream BYTE) */
|
||||
if (seg.format != GST_FORMAT_TIME) {
|
||||
if (format != GST_FORMAT_TIME) {
|
||||
dec->priv->base_ts = seg.start;
|
||||
dec->priv->samples = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue