summaryrefslogtreecommitdiff
path: root/src/internal/subtitle/renderers/kitsubass.c
diff options
context:
space:
mode:
authorTuomas Virtanen <katajakasa@gmail.com>2018-11-14 18:33:07 +0200
committerTuomas Virtanen <katajakasa@gmail.com>2018-11-14 18:33:07 +0200
commita24e6cd7773c8f10cf1fc86eab96c570f99ca7bd (patch)
treea0192370746ab3b16a50c2aad2abf7f27d6763f2 /src/internal/subtitle/renderers/kitsubass.c
parent25747441205f7973ea8815f1014372378ff34858 (diff)
Use macros for checking avcodec features
Diffstat (limited to 'src/internal/subtitle/renderers/kitsubass.c')
-rw-r--r--src/internal/subtitle/renderers/kitsubass.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/internal/subtitle/renderers/kitsubass.c b/src/internal/subtitle/renderers/kitsubass.c
index c229406..505d80f 100644
--- a/src/internal/subtitle/renderers/kitsubass.c
+++ b/src/internal/subtitle/renderers/kitsubass.c
@@ -55,20 +55,20 @@ static void ren_render_ass_cb(Kit_SubtitleRenderer *ren, void *src, double pts,
for(int r = 0; r < sub->num_rects; r++) {
if(sub->rects[r]->ass == NULL)
continue;
- if(LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,25,100)) {
- ass_process_data(
- ass_ren->track,
- sub->rects[r]->ass,
- strlen(sub->rects[r]->ass));
- } else {
- // This requires the sub_text_format codec_opt set for ffmpeg
- ass_process_chunk(
- ass_ren->track,
- sub->rects[r]->ass,
- strlen(sub->rects[r]->ass),
- start_ms,
- end_ms);
- }
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,25,100)
+ ass_process_data(
+ ass_ren->track,
+ sub->rects[r]->ass,
+ strlen(sub->rects[r]->ass));
+#else
+ // This requires the sub_text_format codec_opt set for ffmpeg
+ ass_process_chunk(
+ ass_ren->track,
+ sub->rects[r]->ass,
+ strlen(sub->rects[r]->ass),
+ start_ms,
+ end_ms);
+#endif
}
Kit_UnlockDecoderOutput(ren->dec);
}