From: Michael Niedermayer Date: Fri, 4 Mar 2011 03:24:16 +0000 (+0100) Subject: Move guess_correct_pts() under got_picture_ptr. X-Git-Tag: android-x86-4.4-r1~18257 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ad82bf9ce0de510f758d08f8c396dcd0460df8fd;p=android-x86%2Fexternal-ffmpeg.git Move guess_correct_pts() under got_picture_ptr. --- diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 7fba5c6aeb..40d689e1f6 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -709,12 +709,13 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi emms_c(); //needed to avoid an emms_c() call before every return; - picture->best_effort_timestamp = guess_correct_pts(avctx, - picture->pkt_pts, - picture->pkt_dts); - if (*got_picture_ptr) + if (*got_picture_ptr){ avctx->frame_number++; + picture->best_effort_timestamp = guess_correct_pts(avctx, + picture->pkt_pts, + picture->pkt_dts); + } }else ret= 0;