mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
gst/gstpreset.c: Try harder to use the return value from fgets().
Original commit message from CVS: * gst/gstpreset.c: Try harder to use the return value from fgets().
This commit is contained in:
parent
3b14dfdc66
commit
00d5a68057
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-11-22 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* gst/gstpreset.c:
|
||||||
|
Try harder to use the return value from fgets().
|
||||||
|
|
||||||
2007-11-21 Stefan Kost <ensonic@users.sf.net>
|
2007-11-21 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gst/gstpreset.c:
|
* gst/gstpreset.c:
|
||||||
|
|
|
@ -141,11 +141,11 @@ preset_get_path (GstPreset * self)
|
||||||
GST_INFO ("file_name: '%s'", file_name);
|
GST_INFO ("file_name: '%s'", file_name);
|
||||||
/*
|
/*
|
||||||
'/home/ensonic/buzztard/lib/gstreamer-0.10/libgstsimsyn.so'
|
'/home/ensonic/buzztard/lib/gstreamer-0.10/libgstsimsyn.so'
|
||||||
-> '/home/ensonic/buzztard/share/gstreamer-0.10/GstSimSyn.prs'
|
-> '/home/ensonic/buzztard/share/gstreamer-0.10/presets/GstSimSyn.prs'
|
||||||
-> '$HOME/.gstreamer-0.10/presets/GstSimSyn.prs'
|
-> '$HOME/.gstreamer-0.10/presets/GstSimSyn.prs'
|
||||||
|
|
||||||
'/usr/lib/gstreamer-0.10/libgstaudiofx.so'
|
'/usr/lib/gstreamer-0.10/libgstaudiofx.so'
|
||||||
-> '/usr/share/gstreamer-0.10/GstAudioPanorama.prs'
|
-> '/usr/share/gstreamer-0.10/presets/GstAudioPanorama.prs'
|
||||||
-> '$HOME/.gstreamer-0.10/presets/GstAudioPanorama.prs'
|
-> '$HOME/.gstreamer-0.10/presets/GstAudioPanorama.prs'
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,8 @@ gst_preset_default_get_preset_names (GstPreset * self)
|
||||||
/* read preset entries */
|
/* read preset entries */
|
||||||
while (!feof (in)) {
|
while (!feof (in)) {
|
||||||
/* read preset entry */
|
/* read preset entry */
|
||||||
(void) fgets (line, LINE_LEN, in);
|
if (!fgets (line, LINE_LEN, in))
|
||||||
|
break;
|
||||||
g_strchomp (line);
|
g_strchomp (line);
|
||||||
if (*line) {
|
if (*line) {
|
||||||
preset_name = g_strdup (line);
|
preset_name = g_strdup (line);
|
||||||
|
@ -261,8 +262,7 @@ gst_preset_default_get_preset_names (GstPreset * self)
|
||||||
/* read preset lines */
|
/* read preset lines */
|
||||||
parse_preset = TRUE;
|
parse_preset = TRUE;
|
||||||
while (parse_preset) {
|
while (parse_preset) {
|
||||||
(void) fgets (line, LINE_LEN, in);
|
if (!fgets (line, LINE_LEN, in) || (*line == '\n')) {
|
||||||
if (feof (in) || (*line == '\n')) {
|
|
||||||
GST_DEBUG ("preset done");
|
GST_DEBUG ("preset done");
|
||||||
parse_preset = FALSE;
|
parse_preset = FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue