mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
fwrite doesn't return the number of bytes written. check that fwrite is
non-zero and that ferror() isn't set instead.
This commit is contained in:
parent
de54e7a312
commit
295d177d12
1 changed files with 2 additions and 2 deletions
|
@ -777,9 +777,9 @@ ges_timeline_pipeline_save_thumbnail (GESTimelinePipeline * self, int width, int
|
|||
}
|
||||
|
||||
fp = fopen (location, "w+");
|
||||
if (fwrite (GST_BUFFER_DATA (b), GST_BUFFER_SIZE (b), 1,
|
||||
fp) != GST_BUFFER_SIZE (b))
|
||||
if (!fwrite (GST_BUFFER_DATA (b), GST_BUFFER_SIZE (b), 1, fp) || ferror (fp)) {
|
||||
res = FALSE;
|
||||
}
|
||||
|
||||
fclose (fp);
|
||||
gst_caps_unref (caps);
|
||||
|
|
Loading…
Reference in a new issue