mxfdec: Fix the error handling for when strftime fails
authorMartin Storsjö <martin@martin.st>
Sat, 7 Mar 2015 22:19:45 +0000 (00:19 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 13 Mar 2015 12:04:31 +0000 (13:04 +0100)
The str variable is a char ** here.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6448f15af02f2c3cf0df8cb8237957e426041f2d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mxfdec.c

index 2e8dd05..e8fa731 100644 (file)
@@ -2041,7 +2041,7 @@ static int mxf_timestamp_to_str(uint64_t timestamp, char **str)
     if (!*str)
         return AVERROR(ENOMEM);
     if (!strftime(*str, 32, "%Y-%m-%d %H:%M:%S", &time))
-        str[0] = '\0';
+        (*str)[0] = '\0';
 
     return 0;
 }