[FFmpeg-devel] [PATCH v3 1/2] ffmpeg: refactor post-decoding steps for subtitles into a function

Anton Khirnov anton at khirnov.net
Tue Aug 2 16:15:32 EEST 2022


Quoting Jan Ekström (2022-07-29 15:35:36)
> From: Jan Ekström <jan.ekstrom at 24i.com>
> 
> This enables us to later call this when generating additional
> subtitles for splitting purposes.
> 
> Co-authored-by: Andrzej Nadachowski <andrzej.nadachowski at 24i.com>
> 
> Signed-off-by: Jan Ekström <jan.ekstrom at 24i.com>
> ---
>  fftools/ffmpeg.c | 50 ++++++++++++++++++++++++++++--------------------
>  1 file changed, 29 insertions(+), 21 deletions(-)
> 
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index 4746742c02..adcab43a30 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -2301,27 +2301,16 @@ fail:
>      return err < 0 ? err : ret;
>  }
>  
> -static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output,
> -                               int *decode_failed)
> +static int encode_mux_subtitles(InputStream *ist, AVSubtitle *subtitle, int *got_output)

A function called 'encode_mux' should not be doing anything with an
input stream.

I also think this will spurisouly increment ist->frames_decoded after
the second patch.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list