[SCM] libav/experimental: In mxf muxer, check the return value of gmtime, fix #2494

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:21:53 UTC 2013


The following commit has been merged in the experimental branch:
commit 6dc7dc08ed66524f174ad2c0a5e32178a1173434
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Fri Jan 14 22:36:23 2011 +0000

    In mxf muxer, check the return value of gmtime, fix #2494
    
    Originally committed as revision 26343 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index d589939..c53849a 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1379,6 +1379,8 @@ static int mxf_parse_mpeg2_frame(AVFormatContext *s, AVStream *st,
 static uint64_t mxf_parse_timestamp(time_t timestamp)
 {
     struct tm *time = gmtime(&timestamp);
+    if (!time)
+        return 0;
     return (uint64_t)(time->tm_year+1900) << 48 |
            (uint64_t)(time->tm_mon+1)     << 40 |
            (uint64_t) time->tm_mday       << 32 |

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list