<div dir="ltr">How should I validate pts/dts after demuxing and then after decoding?<div><br></div><div>For me it is significant to have valid pts all the time for days and possibly weeks of continuous streaming.</div><div><br></div><div>After demuxing I check:</div><div>1) dts <= pts</div><div>2) prev_packet_dts < next_packet_pts</div><div>3) I also discard packets with <span style="color:rgb(144,139,37);background-color:rgb(43,43,43);font-family:"JetBrains Mono",monospace;font-size:9.8pt">AV_NOPTS_VALUE</span> and wait for packets with proper pts, because I don't know video duration at this case.</div><div>* pts of packets can be not increasing because of I-P-B frames</div><div>Is it all right?</div><div><br></div><div>What about decoded AVFrames?</div><div>1) Should 'pts' be increasing all the time?</div><div>2) Why at some point 'pts' could lag behind 'dts'?</div><div>3) Why <span style="color:rgb(147,115,165);background-color:rgb(43,43,43);font-family:"JetBrains Mono",monospace;font-size:9.8pt">pict_type</span> is a parameter of AVFrame? Should be at AVPacket, because AVPacket is a compressed frame, not the opposite?</div></div>