#include "avformat.h"
#include "internal.h"
#include "subtitles.h"
+#include "libavcodec/internal.h"
#include "libavcodec/jacosub.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
JACOsubContext *jacosub = s->priv_data;
int shift_set = 0; // only the first shift matters
int merge_line = 0;
- int i;
+ int i, ret;
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
}
/* general/essential directives in the extradata */
- av_bprint_finalize(&header, (char **)&st->codec->extradata);
- st->codec->extradata_size = header.len + 1;
+ ret = avpriv_bprint_to_extradata(st->codec, &header);
+ if (ret < 0)
+ return ret;
/* SHIFT and TIMERES affect the whole script so packet timing can only be
* done in a second pass */
.read_packet = jacosub_read_packet,
.read_seek2 = jacosub_read_seek,
.read_close = jacosub_read_close,
- .flags = AVFMT_GENERIC_INDEX,
};