avctx->subtitle_header = av_malloc(avctx->extradata_size + 1);
if (!avctx->subtitle_header)
return AVERROR(ENOMEM);
- memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
+ if (avctx->extradata_size)
+ memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
avctx->subtitle_header[avctx->extradata_size] = 0;
avctx->subtitle_header_size = avctx->extradata_size;
return 0;
}
#if CONFIG_SSA_DECODER
-AVCodec ff_ssa_decoder = {
+const AVCodec ff_ssa_decoder = {
.name = "ssa",
.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
#endif
#if CONFIG_ASS_DECODER
-AVCodec ff_ass_decoder = {
+const AVCodec ff_ass_decoder = {
.name = "ass",
.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,