Move guess_correct_pts() under got_picture_ptr.

This commit is contained in:
Michael Niedermayer 2011-03-04 04:24:16 +01:00
parent 3088635a44
commit ad82bf9ce0
1 changed files with 5 additions and 4 deletions

View File

@ -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;