[FFmpeg-soc] [soc]: r2901 - mxf/mxfenc.c
spyfeng
subversion at mplayerhq.hu
Tue Jul 29 18:49:06 CEST 2008
Author: spyfeng
Date: Tue Jul 29 18:49:06 2008
New Revision: 2901
Log:
use AV_WB24() function instead of the 3 bytes assignment.
Modified:
mxf/mxfenc.c
Modified: mxf/mxfenc.c
==============================================================================
--- mxf/mxfenc.c (original)
+++ mxf/mxfenc.c Tue Jul 29 18:49:06 2008
@@ -376,9 +376,7 @@ static int mxf_write_preface(AVFormatCon
UID uid;
ByteIOContext *pb = s->pb;
- klv->key[13] = 0x01;
- klv->key[14] = 0x2f;
- klv->key[15] = 0x00;
+ AV_WB24(klv->key + 13, 0x012f00);
put_buffer(pb, klv->key, 16);
klv_encode_ber_length(pb, 146);
@@ -434,9 +432,7 @@ static int mxf_write_identification(AVFo
UID uid;
int length, company_name_len, product_name_len, version_string_len;
- klv->key[13] = 0x01;
- klv->key[14] = 0x30;
- klv->key[15] = 0x00;
+ AV_WB24(klv->key + 13, 0x013000);
put_buffer(pb, klv->key, 16);
@@ -485,9 +481,7 @@ static int mxf_write_content_storage(AVF
MXFReferenceContext *refs = mxf->reference;
ByteIOContext *pb = s->pb;
- klv->key[13] = 0x01;
- klv->key[14] = 0x18;
- klv->key[15] = 0x00;
+ AV_WB24(klv->key + 13, 0x011800);
put_buffer(pb, klv->key, 16);
klv_encode_ber_length(pb, 64);
@@ -602,9 +596,7 @@ static int mxf_write_track(AVFormatConte
const MXFEssenceElementKey *element;
int i = 0;
- klv->key[13] = 0x01;
- klv->key[14] = 0x3b;
- klv->key[15] = 0x00;
+ AV_WB24(klv->key + 13, 0x013b00);
put_buffer(pb, klv->key, 16);
klv_encode_ber_length(pb, 80);
@@ -672,9 +664,7 @@ static int mxf_write_sequence(AVFormatCo
AVStream *st;
const MXFDataDefinitionUL * data_def_ul;
- klv->key[13] = 0x01;
- klv->key[14] = 0x0f;
- klv->key[15] = 0x00;
+ AV_WB24(klv->key + 13, 0x010f00);
put_buffer(pb, klv->key, 16);
klv_encode_ber_length(pb, 80);
@@ -713,9 +703,8 @@ static int mxf_write_structural_componen
const MXFDataDefinitionUL * data_def_ul;
int i;
- klv->key[13] = 0x01;
- klv->key[14] = 0x11;
- klv->key[15] = 0x00;
+ AV_WB24(klv->key + 13, 0x011100);
+
put_buffer(pb, klv->key, 16);
klv_encode_ber_length(pb, 108);
@@ -767,9 +756,7 @@ static int mxf_write_multi_descriptor(AV
MXFReferenceContext *refs = mxf->reference;
ByteIOContext *pb = s->pb;
- klv->key[13] = 0x01;
- klv->key[14] = 0x44;
- klv->key[15] = 0x00;
+ AV_WB24(klv->key + 13, 0x014400);
put_buffer(pb, klv->key, 16);
klv_encode_ber_length(pb, 64 + 16 * s->nb_streams);
More information about the FFmpeg-soc
mailing list