mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
Found more problems. Refix #112329.
Original commit message from CVS: Found more problems. Refix #112329.
This commit is contained in:
parent
dc32c94af9
commit
8de562cd70
1 changed files with 13 additions and 17 deletions
|
@ -115,23 +115,20 @@ gst_aasink_drivers_get_type (void)
|
||||||
if (!driver_type) {
|
if (!driver_type) {
|
||||||
GEnumValue *drivers;
|
GEnumValue *drivers;
|
||||||
const struct aa_driver *driver;
|
const struct aa_driver *driver;
|
||||||
gint i = 0;
|
gint n_drivers;
|
||||||
|
gint i;
|
||||||
|
|
||||||
driver = aa_drivers[i++];
|
for (n_drivers = 0; aa_drivers[n_drivers]; n_drivers++){
|
||||||
while (driver) {
|
/* count number of drivers */
|
||||||
driver = aa_drivers[i++];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
drivers = g_new0(GEnumValue, i);
|
drivers = g_new0(GEnumValue, n_drivers + 1);
|
||||||
|
|
||||||
i = 0;
|
for (i = 0; i < n_drivers; i++){
|
||||||
driver = aa_drivers[i];
|
driver = aa_drivers[i];
|
||||||
while (driver) {
|
|
||||||
drivers[i].value = i;
|
drivers[i].value = i;
|
||||||
drivers[i].value_name = g_strdup (driver->shortname);
|
drivers[i].value_name = g_strdup (driver->shortname);
|
||||||
drivers[i].value_nick = g_strdup (driver->name);
|
drivers[i].value_nick = g_strdup (driver->name);
|
||||||
i++;
|
|
||||||
driver = aa_drivers[i];
|
|
||||||
}
|
}
|
||||||
drivers[i].value = 0;
|
drivers[i].value = 0;
|
||||||
drivers[i].value_name = NULL;
|
drivers[i].value_name = NULL;
|
||||||
|
@ -149,20 +146,19 @@ gst_aasink_dither_get_type (void)
|
||||||
static GType dither_type = 0;
|
static GType dither_type = 0;
|
||||||
if (!dither_type) {
|
if (!dither_type) {
|
||||||
GEnumValue *ditherers;
|
GEnumValue *ditherers;
|
||||||
gint i = 0;
|
gint n_ditherers;
|
||||||
|
gint i;
|
||||||
|
|
||||||
while (aa_dithernames[i]) {
|
for (n_ditherers = 0; aa_dithernames[n_ditherers]; n_ditherers++){
|
||||||
i++;
|
/* count number of ditherers */
|
||||||
}
|
}
|
||||||
|
|
||||||
ditherers = g_new0(GEnumValue, i + 1);
|
ditherers = g_new0(GEnumValue, n_ditherers + 1);
|
||||||
|
|
||||||
i = 0;
|
for (i = 0; i < n_ditherers; i++){
|
||||||
while (aa_dithernames[i]) {
|
|
||||||
ditherers[i].value = i;
|
ditherers[i].value = i;
|
||||||
ditherers[i].value_name = g_strdup (aa_dithernames[i]);
|
ditherers[i].value_name = g_strdup (aa_dithernames[i]);
|
||||||
ditherers[i].value_nick = g_strdup (aa_dithernames[i]);
|
ditherers[i].value_nick = g_strdup (aa_dithernames[i]);
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
ditherers[i].value = 0;
|
ditherers[i].value = 0;
|
||||||
ditherers[i].value_name = NULL;
|
ditherers[i].value_name = NULL;
|
||||||
|
|
Loading…
Reference in a new issue