Skip to content

Commit

Permalink
ffmpeg: call sub2video_update for end packets.
Browse files Browse the repository at this point in the history
Without that change, all subtitles will stay until the next one.
  • Loading branch information
Nicolas George committed Sep 15, 2012
1 parent f1ca40e commit 1b9a251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1683,13 +1683,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];

Expand Down

0 comments on commit 1b9a251

Please sign in to comment.