I am working in a streaming project which uses MPEG2TS protocol, Currently I am facing problem in audio video synchronization.
I am using PCR calculation as
PCR_base = (system_clock_frequency * PTS(audio/video)  ) /300
PCR_ext = (system_clock_frequency * PTS(audio/video)  ) % 300
and emiting PCR at every 100ms
I am using PTS value as 
PTS= (Encoded_time_stamp * 9 / 100 ) / 300
I am getting a av sync delay of -150ms(video ahead of audio) in mplayer and in VLC player I am getting only the First frame of video.
Please help me with the PCR calculation for muxing and also how to get the audio video synchronization.