Hi all.
My application uses its own means to receive and parse RTP stream,
containing H264 video (parser code, however, is based on the code from
rtpdec_h264.c).
Then parsed packets go to the LibAV decoder and decoding result is presented
on the screen.

Sometimes I observe image flickering, like too late frames are being
displayed (humans and cars are jumping back and forth). This usually happens
after the H264 decoder writes to the debug that it "increases reorder".

Currently my code looks like the following



The line, surrounded with //!!!!!! is my big problem. AVFrame structure has
three fields, related to timestamping (plus one deprecated called
reordered_opaque): pkt_dts, pkt_pts and best_effort_timestamp. 

Which one should I choose to get correct timestamping?

I tried original RTP timestamp, pkt_pts and pkt_dts, all of them don't
prevent that flickering. Moreover, I tried printing those values, and have
found that sometimes DTS (pkt_dts) *is* *greater* *than* PTS (pkt_pts),
which is weird. This usually happens after the decoder prints messages about
"it has increased reorder buffer".
Will try now best_effort_timestamp. The situation complicates by the fact
that this happens not every time.


--
View this message in context: 
http://libav-api.1054858.n5.nabble.com/libav-api-Which-timestamping-information-from-AVFrame-should-I-use-and-how-tp5093773p5093773.html
Sent from the libav-api mailing list archive at Nabble.com.
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to