Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-09-09 18:37:45 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-09-15 18:14:33 +0400
commita9e481771630a1db983c1195dd7f63370ac8a84d (patch)
tree5bd7c9680145fb3e1bd6506666042380dc9473c3 /ffmpeg.c
parent2939e258f9d1fff89b3b68536beb931b54611585 (diff)
ffmpeg: use PTS from the AVSubtitle structure for sub2video.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index dfef64f344..c48aec7116 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -202,13 +202,14 @@ static void sub2video_push_ref(InputStream *ist, int64_t pts)
AV_BUFFERSRC_FLAG_PUSH);
}
-static void sub2video_update(InputStream *ist, AVSubtitle *sub, int64_t pts)
+static void sub2video_update(InputStream *ist, AVSubtitle *sub)
{
int w = ist->sub2video.w, h = ist->sub2video.h;
AVFilterBufferRef *ref = ist->sub2video.ref;
int8_t *dst;
int dst_linesize;
int i;
+ int64_t pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ist->st->time_base);
if (!ref)
return;
@@ -1680,7 +1681,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
FFSWAP(AVSubtitle, subtitle, ist->prev_sub.subtitle);
}
- sub2video_update(ist, &subtitle, pkt->pts);
+ sub2video_update(ist, &subtitle);
if (!*got_output || !subtitle.num_rects)
return ret;