diff mbox series

[FFmpeg-devel,7/9] avfilter/vf_subtitles: Remove obsolete LIBAVCODEC_VERSION_INT checks

Message ID 20200910214901.25401-7-andreas.rheinhardt@gmail.com
State Accepted
Commit b091df721050df77d537cee8156fe1a4406b1afb
Headers show
Series [FFmpeg-devel,1/9] avfilter/lavfutils: Don't use uninitialized pointers for freeing
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 10, 2020, 9:48 p.m. UTC
libavcodec major version is already 58.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavfilter/vf_subtitles.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

Nicolas George Sept. 11, 2020, 9:17 a.m. UTC | #1
Andreas Rheinhardt (12020-09-10):
> libavcodec major version is already 58.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavfilter/vf_subtitles.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)

LGTM.

Regards,
Paul B Mahol Sept. 11, 2020, 9:18 a.m. UTC | #2
On Thu, Sep 10, 2020 at 11:48:59PM +0200, Andreas Rheinhardt wrote:
> libavcodec major version is already 58.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavfilter/vf_subtitles.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 

ok

> 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);
>                  }
>              }
>          }
> -- 
> 2.20.1
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

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