[FFmpeg-cvslog] commit: In mxf muxer, check the return value of gmtime, fix #2494 ( Baptiste Coudurier )
git at videolan.org
git
Fri Jan 14 23:43:13 CET 2011
ffmpeg | branch: master | Baptiste Coudurier <baptiste.coudurier at gmail.com> | Fri Jan 14 22:36:23 2011 +0000| [6dc7dc08ed66524f174ad2c0a5e32178a1173434] | committer: Baptiste Coudurier
In mxf muxer, check the return value of gmtime, fix #2494
Originally committed as revision 26343 to svn://svn.ffmpeg.org/ffmpeg/trunk
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dc7dc08ed66524f174ad2c0a5e32178a1173434
---
libavformat/mxfenc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
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(×tamp);
+ 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 |
More information about the ffmpeg-cvslog
mailing list