diff mbox

[FFmpeg-devel,1/3] avformat/mxfdec: replace obsolete comment

Message ID 20181223001256.31893-1-cus@passwd.hu
State Accepted
Commit d0e43cf1a89c03913110c1b8acb6dd5acfc8693a
Headers show

Commit Message

Marton Balint Dec. 23, 2018, 12:12 a.m. UTC
We no longer use strftime directly but use av_timegm to get an int64_t timestamp.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/mxfdec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Paul B Mahol Dec. 23, 2018, 6:32 p.m. UTC | #1
On 12/23/18, Marton Balint <cus@passwd.hu> wrote:
> We no longer use strftime directly but use av_timegm to get an int64_t
> timestamp.
>
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavformat/mxfdec.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>

LGTM
Marton Balint Dec. 25, 2018, 7:22 p.m. UTC | #2
On Sun, 23 Dec 2018, Paul B Mahol wrote:

> On 12/23/18, Marton Balint <cus@passwd.hu> wrote:
>> We no longer use strftime directly but use av_timegm to get an int64_t
>> timestamp.
>>
>> Signed-off-by: Marton Balint <cus@passwd.hu>
>> ---
>>  libavformat/mxfdec.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>
> LGTM

Thanks, pushed.

Regards,
Marton
diff mbox

Patch

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 6e96107498..d78f8ad2e4 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2563,9 +2563,7 @@  static int64_t mxf_timestamp_to_int64(uint64_t timestamp)
     time.tm_min  = (timestamp >> 16 & 0xFF);
     time.tm_sec  = (timestamp >> 8  & 0xFF);
 
-    /* msvcrt versions of strftime calls the invalid parameter handler
-     * (aborting the process if one isn't set) if the parameters are out
-     * of range. */
+    /* Clip values for legacy reasons. Maybe we should return error instead? */
     time.tm_mon  = av_clip(time.tm_mon,  0, 11);
     time.tm_mday = av_clip(time.tm_mday, 1, 31);
     time.tm_hour = av_clip(time.tm_hour, 0, 23);