mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
qtmux: avoid removing temp file when error occurred
This commit is contained in:
parent
c2718fdd5f
commit
c35074499a
1 changed files with 9 additions and 1 deletions
|
@ -1125,13 +1125,21 @@ flush_failed:
|
||||||
GST_ELEMENT_ERROR (qtmux, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (qtmux, RESOURCE, WRITE,
|
||||||
("Failed to flush temporary file"), GST_ERROR_SYSTEM);
|
("Failed to flush temporary file"), GST_ERROR_SYSTEM);
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
return ret;
|
goto fail;
|
||||||
}
|
}
|
||||||
seek_failed:
|
seek_failed:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (qtmux, RESOURCE, SEEK,
|
GST_ELEMENT_ERROR (qtmux, RESOURCE, SEEK,
|
||||||
("Failed to seek temporary file"), GST_ERROR_SYSTEM);
|
("Failed to seek temporary file"), GST_ERROR_SYSTEM);
|
||||||
ret = GST_FLOW_ERROR;
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue