<font class="Apple-style-span" color="#000066">Hi,</font><div><font class="Apple-style-span" color="#000066"><br></font></div><div><font class="Apple-style-span" color="#000066">These PTS and DTS used for sync between audio and video data while encoding and presentation. Check below link for more details.</font></div>
<div><font class="Apple-style-span" color="#000066"><br></font></div><div><font class="Apple-style-span" color="#000066"><b><a href="http://dranger.com/ffmpeg/tutorial05.html">http://dranger.com/ffmpeg/tutorial05.html</a></b></font></div>
<div><br></div><div><font class="Apple-style-span" color="#000066">Thanks,</font></div><div><font class="Apple-style-span" color="#000066">Gagan</font><br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga <span dir="ltr"><<a href="mailto:umanga.forums@gmail.com">umanga.forums@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Greetings all,</p><p>I am writing a wrapper class for video/audio encoding by following the "muxing.c".<br>
<a href="http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html" target="_blank">http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html</a></p>
<p>I see in the example that before writing frames to the file ,is checks whether the PTS value of audiostream is <br>lesser than that of videostream.</p><p>code snippet:</p><p> if (!video_st || (video_st && audio_st && audio_pts < video_pts)) {<br>

            write_audio_frame(oc, audio_st);<br>        } else {<br>            write_video_frame(oc, video_st);<br>            picture->pts++;<br>        }</p><p>Can someone explain why this test is done? Whats the connection between PTS values ?</p>

<p> </p>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br><br>
</div>