airplayreceiver icon indicating copy to clipboard operation
airplayreceiver copied to clipboard

why does pts always equal 0?

Open yikuo123 opened this issue 1 year ago • 3 comments

OnH264DataReceived: frameType=5, length=5076, pts=0 OnH264DataReceived: frameType=1, length=250, pts=0 OnH264DataReceived: frameType=1, length=384, pts=0 OnH264DataReceived: frameType=1, length=2393, pts=0 OnH264DataReceived: frameType=1, length=3616, pts=0 OnH264DataReceived: frameType=1, length=3747, pts=0

yikuo123 avatar Aug 08 '22 10:08 yikuo123

Unfortunately I don't know, you should do some tests to understand the problem.

I currently don't have time, if you find the solution you can do a PR.

SteeBono avatar Aug 10 '22 20:08 SteeBono

Thank your reply!

I have done some tests and find the problem. It causes by the flowing code, so session.Pts is never updated and is always 0

if (!session.Pts.HasValue)
{
    session.Pts = header.PayloadPts;
}

but I don't know if it is safe to comment the if statement. I had a try and it looks works.

yikuo123 avatar Aug 11 '22 03:08 yikuo123

Yes, you can remove the IF.

SteeBono avatar Aug 11 '22 06:08 SteeBono