X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_subtitles.c;h=b5f5bc9d19f0421d6308eb118cb83500757a6dde;hb=a5ba4e186bcb44c60f215e1367e3d5269b564cea;hp=aaa8942615776afa340fe6cb716de78a8c89efb5;hpb=0a946599f881b5129c4af2f4678dca40b6668cc0;p=ffmpeg diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index aaa89426157..b5f5bc9d19f 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -302,7 +302,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx) return AVERROR(EINVAL); } dec_desc = avcodec_descriptor_get(dec_ctx->codec_id); - if (dec_desc && (dec_desc->props & AV_CODEC_PROP_BITMAP_SUB)) { + if (dec_desc && !(dec_desc->props & AV_CODEC_PROP_TEXT_SUB)) { av_log(ctx, AV_LOG_ERROR, "Only text based subtitles are currently supported\n"); return AVERROR_PATCHWELCOME; @@ -323,7 +323,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx) pkt.size = 0; while (av_read_frame(fmt, &pkt) >= 0) { int i, got_subtitle; - AVSubtitle sub; + AVSubtitle sub = {0}; if (pkt.stream_index == sid) { ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_subtitle, &pkt);