File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -331,12 +331,13 @@ AMF_RESULT AMFVideoDecoderImpl::InitAMF() {
331331void AMFVideoDecoderImpl::ReleaseAMF () {
332332 if (decoder_ != nullptr ) {
333333 decoder_->Drain ();
334+ decoder_->Flush ();
334335 }
335336 if (polling_thread_ != nullptr ) {
336337 polling_thread_->join ();
338+ polling_thread_.reset ();
337339 }
338340 decoder_ = nullptr ;
339- polling_thread_.reset ();
340341}
341342
342343std::unique_ptr<AMFVideoDecoder> AMFVideoDecoder::Create (
Original file line number Diff line number Diff line change @@ -418,13 +418,14 @@ AMF_RESULT AMFVideoEncoderImpl::InitAMF() {
418418AMF_RESULT AMFVideoEncoderImpl::ReleaseAMF () {
419419 if (encoder_ != nullptr ) {
420420 encoder_->Drain ();
421+ encoder_->Flush ();
421422 }
422423 if (polling_thread_ != nullptr ) {
423424 polling_thread_->join ();
425+ polling_thread_.reset ();
424426 }
425427
426428 encoder_ = nullptr ;
427- polling_thread_.reset ();
428429
429430 return AMF_OK;
430431}
You can’t perform that action at this time.
0 commit comments