This fixes the seeking in h264 B-Frame enabled video issue. #4890
This commit is contained in:
parent
c3d1f94ee6
commit
c03d778ec7
@ -971,7 +971,8 @@ bool CvCapture_FFMPEG::grabFrame()
|
|||||||
{
|
{
|
||||||
//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 != 0 ? packet.pts : packet.dts;
|
picture_pts = picture->pkt_pts != AV_NOPTS_VALUE_ && picture->pkt_pts != 0 ? picture->pkt_pts : picture->pkt_dts;
|
||||||
|
|
||||||
frame_number++;
|
frame_number++;
|
||||||
valid = true;
|
valid = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user