[FFmpeg-cvslog] mpegvideo_enc: fix dts
Michael Niedermayer
git at videolan.org
Sun Apr 15 01:53:52 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 15 01:08:13 2012 +0200| [c354576457c8ae0906d6f4f20c80816f3e3bb55d] | committer: Michael Niedermayer
mpegvideo_enc: fix dts
Fixes Ticket1200
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c354576457c8ae0906d6f4f20c80816f3e3bb55d
---
libavcodec/mpegvideo_enc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 6deb281..15fa9a2 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1590,12 +1590,12 @@ vbv_retry:
avctx->frame_bits = s->frame_bits;
pkt->pts = s->current_picture.f.pts;
- if (!s->low_delay) {
+ if (!s->low_delay && s->pict_type != AV_PICTURE_TYPE_B) {
if (!s->current_picture.f.coded_picture_number)
pkt->dts = pkt->pts - s->dts_delta;
else
pkt->dts = s->reordered_pts;
- s->reordered_pts = s->input_picture[0]->f.pts;
+ s->reordered_pts = pkt->pts;
} else
pkt->dts = pkt->pts;
if (s->current_picture.f.key_frame)
More information about the ffmpeg-cvslog
mailing list