[gstreamer-bugs] [Bug 623388] [audio encoders] Wrong output timestamps when receiving big input buffers
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Jul 2 23:43:24 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=623388
GStreamer | gst-ffmpeg | git
Edward Hervey <bilboed> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #165153|none |reviewed
status| |
--- Comment #14 from Edward Hervey <bilboed at gmail.com> 2010-07-03 06:43:21 UTC ---
Review of attachment 165153:
--> (https://bugzilla.gnome.org/review?bug=623388&attachment=165153)
I still need to test it over all the use-cases that were previously failing,
but the fundamental fix makes complete sense.
::: ext/ffmpeg/gstffmpegenc.c
@@ +918,3 @@
+ frame_bytes = frame_size * osize * ctx->channels;
+
This line doesn't need to be moved from where it was previously
@@ +944,3 @@
+ " and adding consumed time %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (ffmpegenc->adapter_ts),
+ GST_TIME_ARGS (consumed_time), GST_TIME_ARGS (timestamp));
OK to leave this new variable and debug line, it does indeed make debugging
easier for the future and doesn't cost anything when debugging is disabled.
@@ +956,3 @@
upstream_time +=
+ gst_util_uint64_scale (bytes, GST_SECOND,
+ ctx->sample_rate * osize * ctx->channels);
This is the fundamental fix, and only required part to fix the issue.
@@ +987,3 @@
+ /* Note that we take frame_bytes and add frame_size.
+ * Makes sense when resyncing because you don't have to count channels
+ * or samplesize to divide by the samplerate */
OK to leave this comment.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list