mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_subtitles: Remove obsolete LIBAVCODEC_VERSION_INT checks
libavcodec major version is already 58. Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
e65897f3ee
commit
b091df7210
|
@ -396,8 +396,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx)
|
||||||
}
|
}
|
||||||
if (ass->charenc)
|
if (ass->charenc)
|
||||||
av_dict_set(&codec_opts, "sub_charenc", ass->charenc, 0);
|
av_dict_set(&codec_opts, "sub_charenc", ass->charenc, 0);
|
||||||
if (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57,26,100))
|
av_dict_set(&codec_opts, "sub_text_format", "ass", 0);
|
||||||
av_dict_set(&codec_opts, "sub_text_format", "ass", 0);
|
|
||||||
|
|
||||||
dec_ctx = avcodec_alloc_context3(dec);
|
dec_ctx = avcodec_alloc_context3(dec);
|
||||||
if (!dec_ctx) {
|
if (!dec_ctx) {
|
||||||
|
@ -465,11 +464,8 @@ static av_cold int init_subtitles(AVFilterContext *ctx)
|
||||||
char *ass_line = sub.rects[i]->ass;
|
char *ass_line = sub.rects[i]->ass;
|
||||||
if (!ass_line)
|
if (!ass_line)
|
||||||
break;
|
break;
|
||||||
if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,25,100))
|
ass_process_chunk(ass->track, ass_line, strlen(ass_line),
|
||||||
ass_process_data(ass->track, ass_line, strlen(ass_line));
|
start_time, duration);
|
||||||
else
|
|
||||||
ass_process_chunk(ass->track, ass_line, strlen(ass_line),
|
|
||||||
start_time, duration);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue