diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-11-05 11:08:01 +0100 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-11-19 19:21:36 +0100 |
commit | 7e4c96359f775924576dae09bf2fc893d677a72f (patch) | |
tree | b585dce3c5321d50eb445ce55bd394a0e557ec60 | |
parent | 401fb0a09b766107a8a27d1663ec1d4beb99a49b (diff) |
qtmux: avoid removing temp file when error occurred
-rw-r--r-- | 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 83ac60c08..e128e1674 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; } } |