GNOME Bugzilla – Bug 707673
tsdemux: MPTS clock skew issue
Last modified: 2014-06-22 13:09:20 UTC
Created attachment 254331 [details] Patch for fixing MPTS PCR correction issue Hi, For for an MPTS stream, to calculate clock skew, PCRs of all the programs used. This is a bug. Have added a patch which will make sure only that program's PCR is used for skew computation Regards, Jagadish
Could you provide the patch as a git patch ? And remove changes (including whitespace ones) that shouldn't be in it ?
ping ?
My apologies. Completely forgot this. Will send the git compatible patch soon Thanks, Jagadish
Created attachment 264474 [details] [review] MPTS clock skew fix Sorry for the hibernation :) Have attached the git compliant patch
Comment on attachment 264474 [details] [review] MPTS clock skew fix Please provide this in "git format-patch" format. And also make it gst-indent clean and the FIX comments look not very nice either :) Edward, does this otherwise look good?
I haven't had time to review it yet. Do *NOT* push this without my approval, thankyou.
Also ... I'm confused. Where do you think we use random PCR PID (and not the program PCR PID) for skew calculation ?
Hi, Let me explain The function mpegts_packetizer_parse_adaptation_field_control() gets called for for every packet parsing, whether it belongs to my intended program(set through program-number property) or any other program which is present in the MPTS. So essentially clock skew calculation involves (line:380 in git master) calling of get_pcr_table() which gets PCR of a TS of current program which might not be my intended program which causes wrong skew computation And sorry about the patch. It might not be GIT compliant. I messed it up while creating it and now I don't know how to apply it to the original 1.0.8 version :( Regards, Jagadish
(In reply to comment #9) > Hi, > > Let me explain > > The function mpegts_packetizer_parse_adaptation_field_control() gets called for > for every packet parsing, whether it belongs to my intended program(set through > program-number property) or any other program which is present in the MPTS. > > So essentially clock skew calculation involves (line:380 in git master) calling > of get_pcr_table() which gets PCR of a TS of current program which might not be > my intended program which causes wrong skew computation The clock skew calculation is completely decoupled from the programs. That is why you (might) have several PCRTable structures present, one per PCR stream. tsdemux can, based on the selected program (and therefore associated PCR PID), select which PCRtable is used to do the various conversions. If you look at all the mpegts_packetizer_*_to_*() functions, you will see they all have a pcr_pid field by which you can specify which PCRTable will be used. Does that clarify things ?
Edward, What you are saying very much makes sense. But I still feel there is an implementation bug. Let me see if I can get an MPTS file and get the debug trace. Regards, Jagadish
Oh, I think I just realized the issue. You're talking about 1.0.8, which *might* have had that issue. I only care about master here.
Could reproduce the issue with 1.0.8. Tried with 1.2.2. And I dont see any problem. Issue seems to have resolved I will double check tomorrow and close this bug :)
Hi, The bug no longer exists with git master. Hence I'm closing this bug Thanks, Jagadish
*** Bug 702152 has been marked as a duplicate of this bug. ***