bugtracker icon indicating copy to clipboard operation
bugtracker copied to clipboard

PlayerEndpoint failure when stopping and starting again

Open j1elo opened this issue 3 years ago • 2 comments

Prerequisites

These are MANDATORY, otherwise the issue will be automatically closed.

Issue description

PlayerEndpoint shows a frozen frame when calling stop() followed by `play().

Context

OpenVidu support for IP cameras.

How to reproduce?

  1. Create a PlayerEndpoint with a test stream (e.g. an mjpeg or rtsp)
  2. Start playing (play())
  3. Stop playing (stop()). Pausing is not enough, as it keeps the connection active, while we want to save resources and thus all connections should be closed.
  4. Start playing again (play())

Expected & current behavior

Instead of playing again, it shows a frozen frame. Logs show lots of errors pointing to invalid PTS and DTS.

(Optional) Possible solution

Commenting out these two lines the playback restarts successfully. It all points at a potential lack of reinitialization of variables when the stop() is processed. Later, upon the new play(), the expected PTS/DTS don't match the incoming ones, and thus the code exits early. At least that's what it seems to me, after a quick look around.

About Kurento Media Server

  • Kurento version: dev-7.0.0
  • Server OS: Ubuntu 20.04
  • Installation method:
    • [] [apt-get]
    • [] [Docker]
    • [] [AWS CloudFormation]
    • [x] [Built from sources]

j1elo avatar Oct 04 '22 17:10 j1elo

Hello @j1elo! :wave: we're sorry you found a bug... so first of all, thank you very much for reporting it.

To know about progress, check in Triage. All issues are considered Backlog Candidates until work priorities align and the issue is selected for development. It will then become part of our official Backlog.

github-actions[bot] avatar Oct 04 '22 17:10 github-actions[bot]

Possibly related commit: https://github.com/Kurento/kms-elements/commit/0c0bdd6ed79a4a14d698cf3dfb6ee70f5952be99

j1elo avatar Oct 04 '22 17:10 j1elo