diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-23 20:03:57 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-23 20:03:57 +0000 |
commit | e9338da87d7cea7e2f7be27e1b9ac8997ead4ed9 (patch) | |
tree | 0b71a0fba32ea5d8202cafc9195e2886cc07ace0 /libavformat/gxfenc.c | |
parent | 76af2edc44160dea6459052f73e1b1125bad6dbc (diff) | |
download | ffmpeg-e9338da87d7cea7e2f7be27e1b9ac8997ead4ed9.tar.gz |
fix endianness of time code, and calculate it in fields, according to specs
Originally committed as revision 16730 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/gxfenc.c')
-rw-r--r-- | libavformat/gxfenc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index 77a2927447..dd2d76e69e 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -361,13 +361,11 @@ static int gxf_write_flt_packet(ByteIOContext *pb, GXFContext *ctx) static int gxf_write_umf_material_description(ByteIOContext *pb, GXFContext *ctx) { // XXX drop frame - int fps = ctx->sample_rate / 2; - int frames = ctx->nb_frames / 2; uint32_t timecode = - frames % fps << 24 | // frames - frames / fps % 60 << 16 | // seconds - frames / fps * 60 % 60 << 8 | // minutes - frames / fps * 3600 % 24 << 3; // hours + ctx->nb_frames / ctx->sample_rate * 3600 % 24 << 27 | // hours + ctx->nb_frames / ctx->sample_rate * 60 % 60 << 16 | // minutes + ctx->nb_frames / ctx->sample_rate % 60 << 8 | // seconds + ctx->nb_frames % ctx->sample_rate; // fields put_le32(pb, ctx->flags); put_le32(pb, ctx->nb_frames); /* length of the longest track */ |