Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have some issues about "swap" function in DecoderFFMpeg.cpp, NativeCode #26

Open
0x3375 opened this issue Mar 29, 2019 · 1 comment
Open

Comments

@0x3375
Copy link

0x3375 commented Mar 29, 2019

Hello. I have some troubles to use Native code.

I made a project and include all of ffmpeg's lib, and ViveMediaDecoder's include directory.

When I build this project, I got 4 errors.
This errors accured when "mAudioFrames.swap(decltype(mAudioFrames)())" and "mVideoFrames.swap(decltype(mAudioFrames)());" are called.

Error logs below

C2664 : 'void std::queue<AVFrame *,std::deque<_Ty,std::allocator<_Ty>>>::swap(std::queue<_Ty,std::deque<_Ty,std::allocator<_Ty>>> &) noexcept()' : cannot convert argument 1 from 'std::queue<AVFrame *,std::deque<_Ty,std::allocator<_Ty>>>' to 'std::queue<AVFrame *,std::deque<_Ty,std::allocator<_Ty>>> &'

I'm using Visual Studio 2017 and ffmpeg 3.4 now.
Why these errors happen and how can I fix it?

thank you.


add) The swap function appears to exist to initialize all the queues inside.
so, I make empty queue with same data type and swapped.
Is this method appropriate?

mVideoFrames.swap(decltype(mVideoFrames)());
-> mVideoFrames.swap(EmptyQueue);

@kyo8568131
Copy link
Contributor

Hi leeseungho1,

Yes, you can create an empty queue and swap.
The code is just to clear the queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants