[gst-cvs] gst-plugins-bad: qtmux: avoid removing temp file when error occurred
Mark Nauwelaerts
mnauw at kemper.freedesktop.org
Fri Nov 19 10:24:27 PST 2010
Module: gst-plugins-bad
Branch: master
Commit: 7e4c96359f775924576dae09bf2fc893d677a72f
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=7e4c96359f775924576dae09bf2fc893d677a72f
Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date: Fri Nov 5 11:08:01 2010 +0100
qtmux: avoid removing temp file when error occurred
---
gst/qtmux/gstqtmux.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c
index 83ac60c..e128e16 100644
--- a/gst/qtmux/gstqtmux.c
+++ b/gst/qtmux/gstqtmux.c
@@ -1125,13 +1125,21 @@ flush_failed:
GST_ELEMENT_ERROR (qtmux, RESOURCE, WRITE,
("Failed to flush temporary file"), GST_ERROR_SYSTEM);
ret = GST_FLOW_ERROR;
- return ret;
+ goto fail;
}
seek_failed:
{
GST_ELEMENT_ERROR (qtmux, RESOURCE, SEEK,
("Failed to seek temporary file"), GST_ERROR_SYSTEM);
ret = GST_FLOW_ERROR;
+ goto fail;
+ }
+fail:
+ {
+ /* clear descriptor so we don't remove temp file later on,
+ * might be possible to recover */
+ fclose (qtmux->fast_start_file);
+ qtmux->fast_start_file = NULL;
return ret;
}
}
More information about the Gstreamer-commits
mailing list