00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "avformat.h"
00020 #include "rawenc.h"
00021
00022 static int jacosub_write_header(AVFormatContext *s)
00023 {
00024 const AVCodecContext *avctx = s->streams[0]->codec;
00025
00026 if (avctx->extradata_size) {
00027 avio_write(s->pb, avctx->extradata, avctx->extradata_size - 1);
00028 avio_flush(s->pb);
00029 }
00030 return 0;
00031 }
00032
00033 AVOutputFormat ff_jacosub_muxer = {
00034 .name = "jacosub",
00035 .long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle format"),
00036 .mime_type = "text/x-jacosub",
00037 .extensions = "jss,js",
00038 .write_header = jacosub_write_header,
00039 .write_packet = ff_raw_write_packet,
00040 .flags = AVFMT_TS_NONSTRICT,
00041 .subtitle_codec = CODEC_ID_JACOSUB,
00042 };