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:
@@ -85,8 +85,8 @@ BMediaFile::BMediaFile(const media_file_format* mfi, int32 flags)
|
|||||||
BMediaFile::BMediaFile(const BUrl& url)
|
BMediaFile::BMediaFile(const BUrl& url)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
fDeleteSource = true;
|
|
||||||
_Init();
|
_Init();
|
||||||
|
fDeleteSource = true;
|
||||||
_InitReader(NULL, &url);
|
_InitReader(NULL, &url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,8 +94,8 @@ BMediaFile::BMediaFile(const BUrl& url)
|
|||||||
BMediaFile::BMediaFile(const BUrl& url, int32 flags)
|
BMediaFile::BMediaFile(const BUrl& url, int32 flags)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
fDeleteSource = true;
|
|
||||||
_Init();
|
_Init();
|
||||||
|
fDeleteSource = true;
|
||||||
_InitReader(NULL, &url, flags);
|
_InitReader(NULL, &url, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,8 +104,8 @@ BMediaFile::BMediaFile(BUrl destination, const media_file_format* mfi,
|
|||||||
int32 flags)
|
int32 flags)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
fDeleteSource = true;
|
|
||||||
_Init();
|
_Init();
|
||||||
|
fDeleteSource = true;
|
||||||
_InitWriter(NULL, &destination, mfi, flags);
|
_InitWriter(NULL, &destination, mfi, flags);
|
||||||
// TODO: Implement streaming server support, it's
|
// TODO: Implement streaming server support, it's
|
||||||
// a pretty complex thing compared to client mode
|
// a pretty complex thing compared to client mode
|
||||||
|
|||||||
Reference in New Issue
Block a user