[vlc-commits] avcodec: map VLC_TS_INVALID to AV_NOPTS_VALUE
Ilkka Ollakka
git at videolan.org
Wed Sep 7 11:16:44 CEST 2016
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Jun 4 14:00:19 2016 +0300| [80ee9af76f4173bff001c947f763cea9bbd032fa] | committer: Ilkka Ollakka
avcodec: map VLC_TS_INVALID to AV_NOPTS_VALUE
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80ee9af76f4173bff001c947f763cea9bbd032fa
---
modules/codec/avcodec/video.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 7fb94a9..e0abfe8 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -812,8 +812,8 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
{
pkt.data = p_block->p_buffer;
pkt.size = p_block->i_buffer;
- pkt.pts = p_block->i_pts;
- pkt.dts = p_block->i_dts;
+ pkt.pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE;
+ pkt.dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE;
}
else
{
@@ -881,10 +881,10 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
/* Compute the PTS */
mtime_t i_pts = frame->pkt_pts;
- if (i_pts <= VLC_TS_INVALID)
+ if (i_pts == AV_NOPTS_VALUE )
i_pts = frame->pkt_dts;
- if( i_pts <= VLC_TS_INVALID )
+ if( i_pts == AV_NOPTS_VALUE )
i_pts = p_sys->i_pts;
/* Interpolate the next PTS */
More information about the vlc-commits
mailing list