ext/ffmpeg/gstffmpegmux.c: Properly convert buffer duration to an ffmpeg packet duration.
authorAurelien Grimaud <gstelzz@yahoo.fr>
Sun, 6 Jul 2008 21:06:45 +0000 (21:06 +0000)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Sun, 6 Jul 2008 21:06:45 +0000 (21:06 +0000)
Original commit message from CVS:
Based on a patch by: Aurelien Grimaud <gstelzz at yahoo dot fr>
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_collected):
Properly convert buffer duration to an ffmpeg packet duration.
Fixes #371939.

ChangeLog
common
ext/ffmpeg/gstffmpegmux.c

index 7c1b4a7..12d7dab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-07-06  Mark Nauwelaerts  <mark.nauwelaerts@collabora.co.uk>
+
+       Based on a patch by: Aurelien Grimaud <gstelzz at yahoo dot fr>
+
+       * ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_collected):
+       Properly convert buffer duration to an ffmpeg packet duration.
+       Fixes #371939.
+
 2008-07-01  Jan Schmidt  <jan.schmidt@sun.com>
 
        * ext/ffmpeg/gstffmpegdec.c:
diff --git a/common b/common
index d9cd98b..593bb11 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit d9cd98b46aebaf143dc43d8563a3bff650be6a7e
+Subproject commit 593bb114c6f5c32b529aa6443be4c2d60d6484c7
index c3be3cd..ff4b7fa 100644 (file)
@@ -569,8 +569,8 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
 
     if (GST_BUFFER_DURATION_IS_VALID (buf))
       pkt.duration =
-          gst_util_uint64_scale_int (GST_BUFFER_DURATION (buf), AV_TIME_BASE,
-          GST_SECOND);
+          gst_ffmpeg_time_gst_to_ff (GST_BUFFER_DURATION (buf),
+              ffmpegmux->context->streams[best_pad->padnum]->time_base);
     else
       pkt.duration = 0;
     av_write_frame (ffmpegmux->context, &pkt);