<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><br>        AVPacket packet;<br><br></blockquote><div><br></div><div>In the code that do not works packet is not initialized (this may cause av_read_frame failure) and you do not unref it when you do not need it anymore (this may cause a leak but should not be the cause of your problem)</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>            int64_t packetPts = packet.pts == AV_NOPTS_VALUE ? packet.dts : packet.pts;<br><br>            qDebug() << "packet Pts " << packetPts << " flags " << packet.flags;<br><br>            if (packetPts >= targetPts)<br>            {<br></blockquote><div><br></div><div>the pts you have here is in this timebase: pFormatCtx->streams[videoStream]->time_base  , while you are comparing it with an AV_TIME_BASE_Q timebase.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>            err = avcodec_receive_frame(pCodecCtx, pFrame);<br>   <br></blockquote><div><br></div><div>You cannot assume that a single avcodec_receive_frame is enough to get a viewable frame.</div><div><br></div><div>--</div><div>Bye,</div><div> Gabry</div><div><br></div></div></div>

<br>
<p style="margin:0px;font-family:arial,sans-serif;background-color:rgb(255,255,255);text-align:justify"><font size="1"><font color="#808080"><span style="text-align:start">Le informazioni contenute nella presente comunicazione e i relativi allegati possono essere riservate e sono, comunque, destinate esclusivamente alle persone o alla Società sopraindicati e non sono da considerarsi comunicazioni personali, quindi eventuali risposte potranno essere conosciute da persone appartenenti all’azienda. La diffusione, distribuzione e/o copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita ai sensi dell’art. 616 c.p. I dati forniti verranno trattati ai sensi dell'art. 13 del Regolamento UE 2016/679 (normativa sulla privacy). Se ha ricevuto questo messaggio per errore Ti preghiamo di distruggerlo e di informarci immediatamente contattandoci mandando una mail a </span><a href="mailto:privacy@wyscout.com" style="text-align:start" target="_blank">privacy@wyscout.com</a><span style="text-align:start">. Copia integrale dell’informativa potrà essere visionata presso le nostre sedi. </span><br style="text-align:start"></font><br style="color:rgb(34,34,34);text-align:start"><font color="#808080"><span style="text-align:start">Any information herein included (even any attachments) shall be considered confidential and/or privileged material and meant to be only for the abovementioned persons and/or Company, therefore such communication is intended to be for the addressee only. Such information is not personal, that is why this e-mail and any replies may be known exclusively by people belonging to the company. It is expressively not allowed communicate, disclose and/or copy any documentation transmitted by a person other than the recipient, according to the Italian Criminal Code, Section 616 and the Regulation EU 2016/679. Your provided data are processed in accordance with Regulation EU 2016/679 (Data Protection Law), Section 13. A full copy of the relevant information notice is available at the company’s registered office upon request. If you received this in error, please destroy it and inform us immediately by sending an e-mail to the following e-mail address </span><a href="mailto:privacy@wyscout.com" style="text-align:start" target="_blank">privacy@wyscout.com</a><span style="text-align:start">. A full copy of the relevant information notice is available at the company’s registered office upon request.</span></font></font></p>