mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
dashdemux: Don't declare variables inside the for loop header
This is a C99 feature.
This commit is contained in:
parent
7360c93de1
commit
788bb67639
2 changed files with 10 additions and 4 deletions
|
@ -2853,13 +2853,15 @@ gst_dash_demux_parse_http_head (GstDashDemuxClockDrift * clock_drift,
|
||||||
&hour, &minute, &second, zone);
|
&hour, &minute, &second, zone);
|
||||||
if (ret == 7) {
|
if (ret == 7) {
|
||||||
gchar *z = zone;
|
gchar *z = zone;
|
||||||
for (int i = 1; months[i]; ++i) {
|
gint i;
|
||||||
|
|
||||||
|
for (i = 1; months[i]; ++i) {
|
||||||
if (g_ascii_strncasecmp (months[i], monthstr, strlen (months[i])) == 0) {
|
if (g_ascii_strncasecmp (months[i], monthstr, strlen (months[i])) == 0) {
|
||||||
month = i;
|
month = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; timezones[i].name && !parsed_tz; ++i) {
|
for (i = 0; timezones[i].name && !parsed_tz; ++i) {
|
||||||
if (g_ascii_strncasecmp (timezones[i].name, z,
|
if (g_ascii_strncasecmp (timezones[i].name, z,
|
||||||
strlen (timezones[i].name)) == 0) {
|
strlen (timezones[i].name)) == 0) {
|
||||||
tzoffset = timezones[i].tzoffset;
|
tzoffset = timezones[i].tzoffset;
|
||||||
|
|
|
@ -2238,7 +2238,9 @@ gst_mpdparser_parse_utctiming_node (GList ** list, xmlNode * a_node)
|
||||||
|
|
||||||
GST_LOG ("attributes of UTCTiming node:");
|
GST_LOG ("attributes of UTCTiming node:");
|
||||||
if (gst_mpdparser_get_xml_prop_string (a_node, "schemeIdUri", &method)) {
|
if (gst_mpdparser_get_xml_prop_string (a_node, "schemeIdUri", &method)) {
|
||||||
for (int i = 0; gst_mpdparser_utc_timing_methods[i].name; ++i) {
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; gst_mpdparser_utc_timing_methods[i].name; ++i) {
|
||||||
if (g_ascii_strncasecmp (gst_mpdparser_utc_timing_methods[i].name,
|
if (g_ascii_strncasecmp (gst_mpdparser_utc_timing_methods[i].name,
|
||||||
method, strlen (gst_mpdparser_utc_timing_methods[i].name)) == 0) {
|
method, strlen (gst_mpdparser_utc_timing_methods[i].name)) == 0) {
|
||||||
new_timing->method = gst_mpdparser_utc_timing_methods[i].method;
|
new_timing->method = gst_mpdparser_utc_timing_methods[i].method;
|
||||||
|
@ -4107,7 +4109,9 @@ gst_mpd_client_setup_representation (GstMpdClient * client,
|
||||||
/* clip duration of segments to stop at period end */
|
/* clip duration of segments to stop at period end */
|
||||||
if (stream->segments && stream->segments->len) {
|
if (stream->segments && stream->segments->len) {
|
||||||
if (GST_CLOCK_TIME_IS_VALID (PeriodEnd)) {
|
if (GST_CLOCK_TIME_IS_VALID (PeriodEnd)) {
|
||||||
for (guint n = 0; n < stream->segments->len; ++n) {
|
guint n;
|
||||||
|
|
||||||
|
for (n = 0; n < stream->segments->len; ++n) {
|
||||||
GstMediaSegment *media_segment =
|
GstMediaSegment *media_segment =
|
||||||
g_ptr_array_index (stream->segments, n);
|
g_ptr_array_index (stream->segments, n);
|
||||||
if (media_segment) {
|
if (media_segment) {
|
||||||
|
|
Loading…
Reference in a new issue