gst/subenc/gstsrtenc.c: Declare variables at the beginning of blocks. Fixes compilation with gcc 2.x and other compil...

Original commit message from CVS:
Patch by: Jens Granseuer <jensgr at gmx dot net>
* gst/subenc/gstsrtenc.c: (gst_srt_enc_timestamp_to_string):
Declare variables at the beginning of blocks. Fixes compilation with
gcc 2.x and other compilers. Fixes bug #530611.
This commit is contained in:
Jens Granseuer 2008-04-29 19:11:56 +00:00 committed by Sebastian Dröge
parent 63fae1c4bb
commit 9c984b9594
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2008-04-29 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Jens Granseuer <jensgr at gmx dot net>
* gst/subenc/gstsrtenc.c: (gst_srt_enc_timestamp_to_string):
Declare variables at the beginning of blocks. Fixes compilation with
gcc 2.x and other compilers. Fixes bug #530611.
2008-04-29 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* gst/mpegtsparse/mpegtspacketizer.c:

View file

@ -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);
}