ffmpegdecoder: fixed double mutex lock

Error() would call Close() getting stuck in a double mutex lock that could
stall workers. This commit fixes that.
This commit is contained in:
itsmattkc
2020-02-21 20:04:36 +11:00
parent 6c33e85162
commit b0c9711974
3 changed files with 32 additions and 40 deletions
+2 -4
View File
@@ -62,8 +62,6 @@ public:
virtual bool SupportsVideo() override;
virtual bool SupportsAudio() override;
void SetMultithreading(bool e);
virtual void Index(const QAtomicInt *cancelled) override;
signals:
@@ -110,6 +108,8 @@ private:
void RemoveLastFromFrameCache();
void ClearFrameCache();
void ClearResources();
AVFormatContext* fmt_ctx_;
AVCodecContext* codec_ctx_;
AVStream* avstream_;
@@ -127,8 +127,6 @@ private:
AVDictionary* opts_;
bool multithreading_;
QTimer clear_timer_;
QAtomicInt allow_clear_event_;