[vlc-commits] x265: rename dts which was not a time but a frame counter
Steve Lhomme
git at videolan.org
Wed Sep 19 13:23:45 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu May 31 15:02:10 2018 +0200| [8096a8780ed43fe3c415452289ac8ee1ba1c7529] | committer: Steve Lhomme
x265: rename dts which was not a time but a frame counter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8096a8780ed43fe3c415452289ac8ee1ba1c7529
---
modules/codec/x265.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/codec/x265.c b/modules/codec/x265.c
index c958793d71..c918b45f41 100644
--- a/modules/codec/x265.c
+++ b/modules/codec/x265.c
@@ -55,7 +55,7 @@ typedef struct
x265_encoder *h;
x265_param param;
- vlc_tick_t dts;
+ unsigned frame_count;
vlc_tick_t initial_date;
#ifndef NDEBUG
vlc_tick_t start;
@@ -109,7 +109,7 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
p_enc->fmt_in.video.i_frame_rate;
p_block->i_pts = p_sys->initial_date + pic.poc * p_block->i_length;
- p_block->i_dts = p_sys->initial_date + p_sys->dts++ * p_block->i_length;
+ p_block->i_dts = p_sys->initial_date + p_sys->frame_count++ * p_block->i_length;
switch (pic.sliceType)
{
@@ -128,7 +128,7 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
#ifndef NDEBUG
msg_Dbg(p_enc, "%zu bytes (frame %"PRId64", %.2ffps)", p_block->i_buffer,
- p_sys->dts, (float)p_sys->dts * CLOCK_FREQ / (vlc_tick_now() - p_sys->start));
+ p_sys->frame_count, (float)p_sys->frame_count * CLOCK_FREQ / (vlc_tick_now() - p_sys->start));
#endif
return p_block;
@@ -224,7 +224,7 @@ static int Open (vlc_object_t *p_this)
p_extra += nal[i].sizeBytes;
}
- p_sys->dts = 0;
+ p_sys->frame_count = 0;
p_sys->initial_date = VLC_TICK_INVALID;
p_enc->pf_encode_video = Encode;
More information about the vlc-commits
mailing list