X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2FS12MTimecode.h;h=6abe3f6e8a51a4b2aed9c8b59c84f3002e796bef;hb=665b2e2e5dcf2266e636d29bcf4ef281da65117f;hp=88c16f8bbce3a2a8b0e3fab2761e6b0507380a30;hpb=7827a7e7572601440568788cb028ee883498fa15;p=asdcplib.git diff --git a/src/S12MTimecode.h b/src/S12MTimecode.h index 88c16f8..6abe3f6 100644 --- a/src/S12MTimecode.h +++ b/src/S12MTimecode.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2007, John Hurst +Copyright (c) 2007-2014, John Hurst All rights reserved. Redistribution and use in source and binary forms, with or without @@ -45,6 +45,7 @@ namespace ASDCP { class S12MTimecode : public Kumu::IArchive { + protected: ui32_t m_FrameCount; ui32_t m_FPS; @@ -105,10 +106,10 @@ public: if ( *p != 0 ) { - ui32_t hours = atoi(p); - ui32_t minutes = atoi(p+3); - ui32_t seconds = atoi(p+6); - ui32_t frames = atoi(p+9); + ui32_t hours = strtol(p, 0, 10); + ui32_t minutes = strtol(p+3, 0, 10); + ui32_t seconds = strtol(p+6, 0, 10); + ui32_t frames = strtol(p+9, 0, 10); m_FrameCount = (((((hours * 60) + minutes) * 60) + seconds) * m_FPS)+ frames; }