mpeg2enc: Fix compiler warning with clang

gstmpeg2enc.cc:224:5: warning: variable 'n' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
    n++;
    ^
gstmpeg2enc.cc:221:29: note: incremented here
  for (n = 0; fpss[n] != 0; n++) {
                            ^
This commit is contained in:
Sebastian Dröge 2017-01-25 20:54:35 +02:00
parent d6b75e5233
commit f3ef2ebd1f

View file

@ -218,10 +218,9 @@ gst_mpeg2enc_add_fps (GstStructure * structure, gint fpss[])
g_value_init (&list, GST_TYPE_LIST);
g_value_init (&fps, GST_TYPE_FRACTION);
for (n = 0; fpss[n] != 0; n++) {
for (n = 0; fpss[n] != 0; n += 2) {
gst_value_set_fraction (&fps, fpss[n], fpss[n + 1]);
gst_value_list_append_value (&list, &fps);
n++;
}
gst_structure_set_value (structure, "framerate", &list);
g_value_unset (&list);