diff options
Diffstat (limited to 'gst')
-rw-r--r-- | gst/subenc/gstsrtenc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gst/subenc/gstsrtenc.c b/gst/subenc/gstsrtenc.c index c9923fd0..4077f765 100644 --- a/gst/subenc/gstsrtenc.c +++ b/gst/subenc/gstsrtenc.c @@ -63,16 +63,18 @@ GST_BOILERPLATE (GstSrtEnc, gst_srt_enc, GstElement, GST_TYPE_ELEMENT); static gchar * gst_srt_enc_timestamp_to_string (GstClockTime timestamp) { - guint h = timestamp / (3600 * GST_SECOND); + guint h, m, s, ms; + + h = timestamp / (3600 * GST_SECOND); timestamp -= h * 3600 * GST_SECOND; - guint m = timestamp / (60 * GST_SECOND); + m = timestamp / (60 * GST_SECOND); timestamp -= m * 60 * GST_SECOND; - guint s = timestamp / GST_SECOND; + s = timestamp / GST_SECOND; timestamp -= s * GST_SECOND; - guint ms = timestamp / GST_MSECOND; + ms = timestamp / GST_MSECOND; return g_strdup_printf ("%.2d:%.2d:%.2d,%.3d", h, m, s, ms); } |