diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-10 04:53:41 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-10 04:53:41 +0000 |
commit | 216b6631fbabbb2d452d18da2c97ef5dc1d1e974 (patch) | |
tree | 63b72d8dcf398f4f0d685efe60fe99d9db08696e /libavformat | |
parent | 4c125b8f6e6e6e4014517e7d7107a663b0855b5a (diff) | |
download | ffmpeg-216b6631fbabbb2d452d18da2c97ef5dc1d1e974.tar.gz |
correctly set multi track operational pattern
Originally committed as revision 17116 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mxfenc.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index a3a9b397d0..c088c9ed1d 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -381,8 +381,14 @@ static void mxf_write_preface(AVFormatContext *s) mxf_write_local_tag(pb, 16, 0x3B03); mxf_write_uuid(pb, ContentStorage, 0); + // operational pattern mxf_write_local_tag(pb, 16, 0x3B09); - put_buffer(pb, op1a_ul, 16); + if (s->nb_streams > 1) { + put_buffer(pb, op1a_ul, 14); + put_be16(pb, 0x0900); // multi track + } else { + put_buffer(pb, op1a_ul, 16); + } // write essence_container_refs mxf_write_local_tag(pb, 8 + 16 * mxf->essence_container_count, 0x3B0A); @@ -1000,7 +1006,14 @@ static void mxf_write_partition(AVFormatContext *s, int bodysid, put_be64(pb, 0); // bodyOffset put_be32(pb, bodysid); // bodySID - put_buffer(pb, op1a_ul, 16); // operational pattern + + // operational pattern + if (s->nb_streams > 1) { + put_buffer(pb, op1a_ul, 14); + put_be16(pb, 0x0900); // multi track + } else { + put_buffer(pb, op1a_ul, 16); + } // essence container mxf_write_essence_container_refs(s); |