vlc | branch: master | Steve Lhomme <[email protected]> | 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 );
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to