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;
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);