avoid use of "AVFrame::best_effort_timestamp"
This commit is contained in:
parent
d994923fec
commit
fcbfc030ef
@ -444,16 +444,16 @@ bool CvCapture_FFMPEG::grabFrame()
|
|||||||
if (count_errs > max_number_of_attempts)
|
if (count_errs > max_number_of_attempts)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decode video frame
|
// Decode video frame
|
||||||
avcodec_decode_video2(video_st->codec, picture, &got_picture, &packet);
|
avcodec_decode_video2(video_st->codec, picture, &got_picture, &packet);
|
||||||
|
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user