[FFmpeg-cvslog] mxfdec: Fix the error handling for when strftime fails

Martin Storsjö git at videolan.org
Sat Mar 21 02:30:10 CET 2015


ffmpeg | branch: release/2.5 | Martin Storsjö <martin at martin.st> | Sun Mar  8 00:19:45 2015 +0200| [9bb7e2bd90f393c6fc9b4bfa8a523018434b7aa4] | committer: Michael Niedermayer

mxfdec: Fix the error handling for when strftime fails

The str variable is a char ** here.

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bb7e2bd90f393c6fc9b4bfa8a523018434b7aa4
---

 libavformat/mxfdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 0c88a8a..636a3d8 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1976,7 +1976,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;
 }



More information about the ffmpeg-cvslog mailing list