MediaFile: Correctly delete the source on exit

* The delete flag of BUrl constructors was reset by _Init,
this lead to a zombie thread on the background under certain
conditions.
This commit is contained in:
Dario Casalinuovo
2016-09-07 18:02:34 +02:00
parent c6b4e47a50
commit 95a5e62515
+3 -3
View File
@@ -85,8 +85,8 @@ BMediaFile::BMediaFile(const media_file_format* mfi, int32 flags)
BMediaFile::BMediaFile(const BUrl& url)
{
CALLED();
fDeleteSource = true;
_Init();
fDeleteSource = true;
_InitReader(NULL, &url);
}
@@ -94,8 +94,8 @@ BMediaFile::BMediaFile(const BUrl& url)
BMediaFile::BMediaFile(const BUrl& url, int32 flags)
{
CALLED();
fDeleteSource = true;
_Init();
fDeleteSource = true;
_InitReader(NULL, &url, flags);
}
@@ -104,8 +104,8 @@ BMediaFile::BMediaFile(BUrl destination, const media_file_format* mfi,
int32 flags)
{
CALLED();
fDeleteSource = true;
_Init();
fDeleteSource = true;
_InitWriter(NULL, &destination, mfi, flags);
// TODO: Implement streaming server support, it's
// a pretty complex thing compared to client mode