summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-26 02:06:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-10-26 02:06:40 +0100
commit3b709fd912749d7731fa954cfb3aedd18d8a666a (patch)
treea03db8b7a73f30593cae44159cf17042aaf9ce15 /libavformat/mxfdec.c
parent50697ac5b2e7151b7e29299a5e36aef17695f9c4 (diff)
parent9dcf2397219ca796f0fafce2a703770d6fd09920 (diff)
Merge commit '9dcf2397219ca796f0fafce2a703770d6fd09920'
* commit '9dcf2397219ca796f0fafce2a703770d6fd09920': lavf: Check the return value of strftime Conflicts: libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r--libavformat/mxfdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 9d7f2fffcd..b01dd0c5b7 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1877,7 +1877,8 @@ static int mxf_timestamp_to_str(uint64_t timestamp, char **str)
*str = av_mallocz(32);
if (!*str)
return AVERROR(ENOMEM);
- strftime(*str, 32, "%Y-%m-%d %H:%M:%S", &time);
+ if (!strftime(*str, 32, "%Y-%m-%d %H:%M:%S", &time))
+ str[0] = '\0';
return 0;
}