GstAudioEncoder: PTS/DTS reset to 0 on new segment
I have a live audio source that can switch to an audiotestsrc when nothing is received for a while. That source is then encoded with opusenc. I made sure that PTS/DTS on the source keeps continuous when switching to/from audiotestsrc, but the switch generates SEGMENT event that gets catched by GstAudioEncoder that calls gst_audio_encoder_reset()
which causes priv->base_ts
to be reset to GST_CLOCK_TIME_NONE
. That means that after SEGMENT event, the PTS/DTS of output buffers are reset to 0 instead of continuing from previous value. Even more weird is that video encoders does not do that.
I'm not sure what's the proper fix.