[vlc-commits] Adaptive: fix integer promotion

Jean-Baptiste Kempf git at videolan.org
Wed Oct 28 14:30:00 CET 2015


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Oct 28 14:29:11 2015 +0100| [92ff36d40c6e48a8c7b0cc9553e91dbe92e08aae] | committer: Jean-Baptiste Kempf

Adaptive: fix integer promotion

std::max is only defined on same T type. Older GCC fail to promote it
correctly.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92ff36d40c6e48a8c7b0cc9553e91dbe92e08aae
---

 modules/demux/adaptative/playlist/SegmentInformation.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/adaptative/playlist/SegmentInformation.cpp b/modules/demux/adaptative/playlist/SegmentInformation.cpp
index 0e30f0c..b7fc09d 100644
--- a/modules/demux/adaptative/playlist/SegmentInformation.cpp
+++ b/modules/demux/adaptative/playlist/SegmentInformation.cpp
@@ -187,7 +187,7 @@ ISegment * SegmentInformation::getNextSegment(SegmentInfoType type, uint64_t i_p
                 {
                     *pi_newpos = i_pos;
                     /* start number */
-                    *pi_newpos = std::max(templ->startNumber.Get(), i_pos);
+                    *pi_newpos = std::max((uint64_t)templ->startNumber.Get(), i_pos);
                 }
                 return seg;
             }



More information about the vlc-commits mailing list