44
55#include < chrono>
66#include < mutex>
7+ #include < condition_variable>
78#include < atomic>
89#include < thread>
910#include < queue>
@@ -699,15 +700,15 @@ VIDEO_STREAM_API VideoStreamHandle Open(const char* name) {
699700}
700701
701702VIDEO_STREAM_API int Play (VideoStreamHandle h) {
702- auto & it = g_streams.find (h);
703+ auto it = g_streams.find (h);
703704 if (it == g_streams.end ()) {
704705 return 0 ;
705706 }
706707 return it->second .Start ();
707708}
708709
709710VIDEO_STREAM_API int Pause (VideoStreamHandle h) {
710- auto & it = g_streams.find (h);
711+ auto it = g_streams.find (h);
711712 if (it == g_streams.end ()) {
712713 return 0 ;
713714 }
@@ -718,7 +719,7 @@ VIDEO_STREAM_API int Pause(VideoStreamHandle h) {
718719}
719720
720721VIDEO_STREAM_API int Close (VideoStreamHandle h) {
721- auto & it = g_streams.find (h);
722+ auto it = g_streams.find (h);
722723 if (it == g_streams.end ()) {
723724 return 0 ;
724725 }
@@ -727,15 +728,15 @@ VIDEO_STREAM_API int Close(VideoStreamHandle h) {
727728}
728729
729730VIDEO_STREAM_API int Seek (VideoStreamHandle h, time_ns t) {
730- auto & it = g_streams.find (h);
731+ auto it = g_streams.find (h);
731732 if (it == g_streams.end ()) {
732733 return 0 ;
733734 }
734735 return it->second .Seek (t);
735736}
736737
737738VIDEO_STREAM_API time_ns GetDuration (VideoStreamHandle h) {
738- auto & it = g_streams.find (h);
739+ auto it = g_streams.find (h);
739740 if (it == g_streams.end ()) {
740741 return 0 ;
741742 }
@@ -748,7 +749,7 @@ VIDEO_STREAM_API time_ns GetDuration(VideoStreamHandle h) {
748749}
749750
750751VIDEO_STREAM_API time_ns GetTimeStamp (VideoStreamHandle h) {
751- auto & it = g_streams.find (h);
752+ auto it = g_streams.find (h);
752753 if (it == g_streams.end ()) {
753754 return 0 ;
754755 }
@@ -764,7 +765,7 @@ VIDEO_STREAM_API int GetFrame(VideoStreamHandle h, const void** data, int* width
764765 *width = *height = *pitch = 0 ;
765766 *format = VFF_UNKNOWN;
766767
767- auto & it = g_streams.find (h);
768+ auto it = g_streams.find (h);
768769 if (it == g_streams.end ()) {
769770 return 0 ;
770771 }
@@ -782,7 +783,7 @@ VIDEO_STREAM_API int GetFrame(VideoStreamHandle h, const void** data, int* width
782783}
783784
784785VIDEO_STREAM_API int FreeFrame (VideoStreamHandle h, int frame) {
785- auto & it = g_streams.find (h);
786+ auto it = g_streams.find (h);
786787 if (it == g_streams.end ()) {
787788 return 0 ;
788789 }
0 commit comments