[FFmpeg-devel] [PATCH 1/6] ffmpeg: call sub2video_update for end packets.

Philip Langdale philipl at overt.org
Sun Sep 9 23:20:58 CEST 2012


On 09.09.2012 07:50, Nicolas George wrote:
> Without that change, all subtitles will stay until the next one.
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  ffmpeg.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 2763db6..e495da8 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -1678,13 +1678,13 @@ static int transcode_subtitles(InputStream
> *ist, AVPacket *pkt, int *got_output)
>          FFSWAP(AVSubtitle, subtitle,    ist->prev_sub.subtitle);
>      }
>
> +    sub2video_update(ist, &subtitle, pkt->pts);
> +
>      if (!*got_output || !subtitle.num_rects)
>          return ret;
>
>      rate_emu_sleep(ist);
>
> -    sub2video_update(ist, &subtitle, pkt->pts);
> -
>      for (i = 0; i < nb_output_streams; i++) {
>          OutputStream *ost = output_streams[i];

LGTM.

But where were you seeing this failing? My mov_text tests looked fine.

--phil


More information about the ffmpeg-devel mailing list