summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-26 21:55:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-27 00:26:35 +0200
commita9d97e1b0af676c82abbf2673c7fdf7e557a363c (patch)
treec2165276a215c516b7c5a9595d2f56df52c2b3b7 /ffmpeg.c
parent8766ad9eb1b0b498ec5db824c8c34385e3d6d713 (diff)
ffmpeg: use av_rescale_delta() on the audio filter input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 7dc4a3eb81..f2d0b67c09 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1525,9 +1525,9 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
decoded_frame_tb = AV_TIME_BASE_Q;
}
if (decoded_frame->pts != AV_NOPTS_VALUE)
- decoded_frame->pts = av_rescale_q(decoded_frame->pts,
- decoded_frame_tb,
- (AVRational){1, ist->st->codec->sample_rate});
+ decoded_frame->pts = av_rescale_delta(decoded_frame_tb, decoded_frame->pts,
+ (AVRational){1, ist->st->codec->sample_rate}, decoded_frame->nb_samples, &ist->filter_in_rescale_delta_last,
+ (AVRational){1, ist->st->codec->sample_rate});
for (i = 0; i < ist->nb_filters; i++)
av_buffersrc_add_frame(ist->filters[i]->filter, decoded_frame,
AV_BUFFERSRC_FLAG_PUSH);