Commit fcbfc030 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

avoid use of "AVFrame::best_effort_timestamp"

parent d994923f
...@@ -451,9 +451,9 @@ bool CvCapture_FFMPEG::grabFrame() ...@@ -451,9 +451,9 @@ bool CvCapture_FFMPEG::grabFrame()
// Did we get a video frame? // Did we get a video frame?
if(got_picture) if(got_picture)
{ {
picture_pts = picture->best_effort_timestamp; //picture_pts = picture->best_effort_timestamp;
if( picture_pts == AV_NOPTS_VALUE_ ) if( picture_pts == AV_NOPTS_VALUE_ )
picture_pts = packet.pts != AV_NOPTS_VALUE_ ? packet.pts : packet.dts; picture_pts = packet.pts != AV_NOPTS_VALUE_ && packet.pts != 0 ? packet.pts : packet.dts;
frame_number++; frame_number++;
valid = true; valid = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment