mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
ffmpegenc: fix timestamp resyncing some more
Convert bytes to samples in remaining occurrence. See #623388.
This commit is contained in:
parent
b8f556a566
commit
1d0b29414a
1 changed files with 4 additions and 2 deletions
|
@ -960,9 +960,11 @@ gst_ffmpegenc_chain_audio (GstPad * pad, GstBuffer * inbuf)
|
|||
"taking upstream timestamp %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (upstream_time));
|
||||
timestamp = upstream_time;
|
||||
/* samples corresponding to bytes */
|
||||
ffmpegenc->adapter_consumed = bytes / (osize * ctx->channels);
|
||||
ffmpegenc->adapter_ts = upstream_time -
|
||||
gst_util_uint64_scale (bytes, GST_SECOND, ctx->sample_rate);
|
||||
ffmpegenc->adapter_consumed = bytes;
|
||||
gst_util_uint64_scale (ffmpegenc->adapter_consumed, GST_SECOND,
|
||||
ctx->sample_rate);
|
||||
ffmpegenc->discont = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue