mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
mpegvideo: Use the current_picture pts
The picture slot can be recycled by select_input_picture and only current_picture is populated with the valid pts. Unbreak timestamps when in cbr mode. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
6f243b17c5
commit
1c7b71a5bd
@ -1664,12 +1664,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)
|
||||
|
Loading…
Reference in New Issue
Block a user