[FFmpeg-cvslog] r17971 - in trunk: libavformat/mxfenc.c tests/libav.regression.ref
bcoudurier
subversion
Sun Mar 15 00:39:52 CET 2009
Author: bcoudurier
Date: Sun Mar 15 00:39:52 2009
New Revision: 17971
Log:
use utc time for timestamp and do not set it if not specified
Modified:
trunk/libavformat/mxfenc.c
trunk/tests/libav.regression.ref
Modified: trunk/libavformat/mxfenc.c
==============================================================================
--- trunk/libavformat/mxfenc.c Sun Mar 15 00:00:57 2009 (r17970)
+++ trunk/libavformat/mxfenc.c Sun Mar 15 00:39:52 2009 (r17971)
@@ -1368,7 +1368,7 @@ static int mxf_parse_mpeg2_frame(AVForma
static uint64_t mxf_parse_timestamp(time_t timestamp)
{
- struct tm *time = localtime(×tamp);
+ struct tm *time = gmtime(×tamp);
return (uint64_t)(time->tm_year+1900) << 48 |
(uint64_t)(time->tm_mon+1) << 40 |
(uint64_t) time->tm_mday << 32 |
@@ -1490,10 +1490,8 @@ static int mxf_write_header(AVFormatCont
mxf->essence_container_count = 1;
}
- if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT))
mxf_gen_umid(s);
- mxf->timestamp = mxf_parse_timestamp(s->timestamp);
- }
for (i = 0; i < s->nb_streams; i++) {
MXFStreamContext *sc = s->streams[i]->priv_data;
@@ -1502,6 +1500,8 @@ static int mxf_write_header(AVFormatCont
sc->order = AV_RB32(sc->track_essence_element_key+12);
}
+ if (s->timestamp)
+ mxf->timestamp = mxf_parse_timestamp(s->timestamp);
mxf->duration = -1;
mxf->timecode_track = av_mallocz(sizeof(*mxf->timecode_track));
Modified: trunk/tests/libav.regression.ref
==============================================================================
--- trunk/tests/libav.regression.ref Sun Mar 15 00:00:57 2009 (r17970)
+++ trunk/tests/libav.regression.ref Sun Mar 15 00:39:52 2009 (r17971)
@@ -9,10 +9,10 @@ c351132527ccb1e8cab06cc0822fde23 *./test
bdb7484c68db722f66ba1630cf79844c *./tests/data/b-libav.mpg
378880 ./tests/data/b-libav.mpg
./tests/data/b-libav.mpg CRC=0x2b71a386
-ece97d012890ba7f2371246a5f245561 *./tests/data/b-libav.mxf
+259a87c8d22aab76665047ecdbfa9267 *./tests/data/b-libav.mxf
535097 ./tests/data/b-libav.mxf
./tests/data/b-libav.mxf CRC=0xd7ff387d
-89fe0716dee263dd0f52b2d49ad87d38 *./tests/data/b-libav.mxf_d10
+0a7cc51de3da754ce36dffeeda290c45 *./tests/data/b-libav.mxf_d10
5330989 ./tests/data/b-libav.mxf_d10
./tests/data/b-libav.mxf_d10 CRC=0xd241c8b6
c0cc2ae4df6a8b3df84986929a393116 *./tests/data/b-libav.ts
More information about the ffmpeg-cvslog
mailing list