Quantcast

Play-Pause is not working due to wrap over logic in tsdemux.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Play-Pause is not working due to wrap over logic in tsdemux.

Hare Krishna
Hi All,

I have a streaming pipeline which does  RTSP/RTP/MPEG-TS playback.

I have a scenario, where Server can be put in pause and resume state.

Everything is fine until I am not putting server in pause state and resuming back. After resuming, my pipeline is not able to play video and audio.

I debugged the pipeline and found that tsdemux is the one which has wrap around logic in its mpegtspacketizer.c file.

  if (pts < PCRTIME_TO_GSTTIME (refpcr)) {
        /* Only apply wrapover if we're certain it is, and avoid
         * returning bogus values if it's a PTS/DTS which is *just*
         * before the start of the current group
         */
        if (PCRTIME_TO_GSTTIME (refpcr) - pts > GST_SECOND) {
          pts += PCR_GST_MAX_VALUE;
        } else
          refpcr = G_MAXINT64;
      }

Above code snippet is assuming that wrap over happened and adding PCR_GST_MAX_VALUE to the PTS in result i am getting pts of 26hr+ which is  make sinks to unable to render.

PS : After resume, Server is sending new pcr with addition of amount of time it was in pause state but it is sending first two to three pts same as (slightly greater than old pts) old pts. And this is with all the server(regardless of vendors) so i can not blame server for this.

Loading...