[vlc-commits] avcodec: do not call the same code twice in some ifdef condition
Steve Lhomme
git at videolan.org
Wed May 2 18:42:20 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed May 2 17:45:10 2018 +0200| [593d36fd0d971f860bdf79ece51a06f4233a6ee2] | committer: Steve Lhomme
avcodec: do not call the same code twice in some ifdef condition
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=593d36fd0d971f860bdf79ece51a06f4233a6ee2
---
modules/codec/avcodec/video.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 4a06444387..d171b4f5f3 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1142,12 +1142,12 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* Compute the PTS */
#ifdef FF_API_PKT_PTS
mtime_t i_pts = frame->pts;
+
+ if (i_pts == AV_NOPTS_VALUE )
+ i_pts = frame->pkt_dts;
#else
mtime_t i_pts = frame->pkt_pts;
#endif
- if (i_pts == AV_NOPTS_VALUE )
- i_pts = frame->pkt_dts;
-
if( i_pts == AV_NOPTS_VALUE )
i_pts = date_Get( &p_sys->pts );
More information about the vlc-commits
mailing list