mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1864011 - ensure platform encoder is always shut down before destructed. r=media-playback-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D199913
This commit is contained in:
parent
949f77d58f
commit
40b2b23c31
@ -12,6 +12,8 @@
|
||||
#include "ImageContainer.h"
|
||||
#include "libyuv/convert_from.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -23,6 +23,8 @@ class AndroidDataEncoder final : public MediaDataEncoder {
|
||||
MOZ_ASSERT(mConfig.mSize.width > 0 && mConfig.mSize.height > 0);
|
||||
MOZ_ASSERT(mTaskQueue);
|
||||
}
|
||||
~AndroidDataEncoder() { MOZ_ASSERT(!mJavaEncoder); }
|
||||
|
||||
RefPtr<InitPromise> Init() override;
|
||||
RefPtr<EncodePromise> Encode(const MediaData* aSample) override;
|
||||
RefPtr<EncodePromise> Drain() override;
|
||||
|
@ -137,7 +137,11 @@ WebrtcMediaDataEncoder::WebrtcMediaDataEncoder(
|
||||
PodZero(&mCodecSpecific.codecSpecific);
|
||||
}
|
||||
|
||||
WebrtcMediaDataEncoder::~WebrtcMediaDataEncoder() = default;
|
||||
WebrtcMediaDataEncoder::~WebrtcMediaDataEncoder() {
|
||||
if (mEncoder) {
|
||||
Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
static void InitCodecSpecficInfo(
|
||||
webrtc::CodecSpecificInfo& aInfo, const webrtc::VideoCodec* aCodecSettings,
|
||||
|
Loading…
Reference in New Issue
Block a user