[FFmpeg-cvslog] Move guess_correct_pts() under got_picture_ptr.
Michael Niedermayer
git
Fri Mar 4 04:26:47 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 4 04:24:16 2011 +0100| [ad82bf9ce0de510f758d08f8c396dcd0460df8fd] | committer: Michael Niedermayer
Move guess_correct_pts() under got_picture_ptr.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad82bf9ce0de510f758d08f8c396dcd0460df8fd
---
libavcodec/utils.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7fba5c6..40d689e 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;
More information about the ffmpeg-cvslog
mailing list