From: Vadim Pisarevsky Date: Thu, 26 Apr 2012 07:38:35 +0000 (+0000) Subject: avoid use of "AVFrame::best_effort_timestamp" X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~1990 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fcbfc030ef304fb8edd69c5b7bcb67a9cb72f953;p=platform%2Fupstream%2Fopencv.git avoid use of "AVFrame::best_effort_timestamp" --- diff --git a/modules/highgui/src/cap_ffmpeg_impl_v2.hpp b/modules/highgui/src/cap_ffmpeg_impl_v2.hpp index 288a3af..97e26cb 100755 --- a/modules/highgui/src/cap_ffmpeg_impl_v2.hpp +++ b/modules/highgui/src/cap_ffmpeg_impl_v2.hpp @@ -444,16 +444,16 @@ bool CvCapture_FFMPEG::grabFrame() if (count_errs > max_number_of_attempts) break; } - + // Decode video frame avcodec_decode_video2(video_st->codec, picture, &got_picture, &packet); // Did we get a video frame? if(got_picture) { - picture_pts = picture->best_effort_timestamp; + //picture_pts = picture->best_effort_timestamp; 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++; valid = true; }