diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-08-25 20:28:12 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-08-25 20:28:12 +0000 |
commit | 9b0d3e0e03b5b86925e020133540b7e17bea94cd (patch) | |
tree | c94d898816d7d5c9f1da6caaee5e1b3a540e8e0e | |
parent | 9ac78726b8d5445bf26d982e74db24c6387a9ed3 (diff) | |
download | ffmpeg-9b0d3e0e03b5b86925e020133540b7e17bea94cd.tar.gz |
Import more MXF muxer code from the SoC tree
Originally committed as revision 14968 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mxfenc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 665bc2a48d..08f80523d8 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -468,20 +468,6 @@ static void mxf_write_common_fields( ByteIOContext *pb, AVStream *st) put_be64(pb, st->duration); } -static int mux_write_packet(AVFormatContext *s, AVPacket *pkt) -{ - ByteIOContext *pb = s->pb; - AVStream *st = s->streams[pkt->stream_index]; - MXFStreamContext *sc = st->priv_data; - - put_buffer(pb, sc->track_essence_element_key, 16); // write key - klv_encode_ber_length(pb, pkt->size); // write length - put_buffer(pb, pkt->data, pkt->size); // write value - - put_flush_packet(pb); - return 0; -} - static void mxf_write_sequence(AVFormatContext *s, int stream_index, enum MXFMetadataSetType type) { ByteIOContext *pb = s->pb; @@ -773,6 +759,20 @@ fail: return -1; } +static int mux_write_packet(AVFormatContext *s, AVPacket *pkt) +{ + ByteIOContext *pb = s->pb; + AVStream *st = s->streams[pkt->stream_index]; + MXFStreamContext *sc = st->priv_data; + + put_buffer(pb, sc->track_essence_element_key, 16); // write key + klv_encode_ber_length(pb, pkt->size); // write length + put_buffer(pb, pkt->data, pkt->size); // write value + + put_flush_packet(pb); + return 0; +} + static void mxf_update_header_partition(AVFormatContext *s, int64_t footer_partition_offset) { MXFContext *mxf = s->priv_data; |