[FFmpeg-cvslog] avfilter/vf_subtitles: Remove obsolete LIBAVCODEC_VERSION_INT checks

Andreas Rheinhardt git at videolan.org
Fri Sep 11 16:23:38 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Sep 10 21:55:52 2020 +0200| [b091df721050df77d537cee8156fe1a4406b1afb] | committer: Andreas Rheinhardt

avfilter/vf_subtitles: Remove obsolete LIBAVCODEC_VERSION_INT checks

libavcodec major version is already 58.

Reviewed-by: Nicolas George <george at nsup.org>
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b091df721050df77d537cee8156fe1a4406b1afb
---

 libavfilter/vf_subtitles.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c
index a045375b2d..08b4d4efca 100644
--- a/libavfilter/vf_subtitles.c
+++ b/libavfilter/vf_subtitles.c
@@ -396,8 +396,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx)
     }
     if (ass->charenc)
         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);
     if (!dec_ctx) {
@@ -465,11 +464,8 @@ static av_cold int init_subtitles(AVFilterContext *ctx)
                     char *ass_line = sub.rects[i]->ass;
                     if (!ass_line)
                         break;
-                    if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,25,100))
-                        ass_process_data(ass->track, ass_line, strlen(ass_line));
-                    else
-                        ass_process_chunk(ass->track, ass_line, strlen(ass_line),
-                                          start_time, duration);
+                    ass_process_chunk(ass->track, ass_line, strlen(ass_line),
+                                      start_time, duration);
                 }
             }
         }



More information about the ffmpeg-cvslog mailing list