avformat/mxfdec: Do not process zero modified_date timestamp.
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 22 Dec 2018 18:44:29 +0000 (19:44 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 22 Dec 2018 21:28:52 +0000 (22:28 +0100)
This causes windows to fail as the timestamp is outside its supported range
Fixes regression & fate

Reviewed-by: Marton Balint <cus@passwd.hu>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mxfdec.c

index f5e3a73..6e96107 100644 (file)
@@ -2590,7 +2590,7 @@ static int64_t mxf_timestamp_to_int64(uint64_t timestamp)
 
 #define SET_TS_METADATA(pb, name, var, str) do { \
     var = avio_rb64(pb); \
-    if ((ret = avpriv_dict_set_timestamp(&s->metadata, name, mxf_timestamp_to_int64(var))) < 0) \
+    if (var && (ret = avpriv_dict_set_timestamp(&s->metadata, name, mxf_timestamp_to_int64(var))) < 0) \
         return ret; \
 } while (0)