Skip to content

Commit

Permalink
fix media player container close
Browse files Browse the repository at this point in the history
  • Loading branch information
josephlim94 committed Sep 23, 2023
1 parent d359aaf commit a0446d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions janus_client/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ def stream_media(
if send_video_frame_coroutine:
send_video_frame_coroutine.result()

container.close()


class MediaPlayer:
"""
Expand Down Expand Up @@ -356,5 +358,3 @@ def stop(self) -> None:
# Cannot join here because it will block the event loop and the
# thread won't exit because it's trying to put a frame into async queue
# self.__stream_media_thread.join()

self.__container.close()

0 comments on commit a0446d4

Please sign in to comment.