Created
September 23, 2012 05:37
-
-
Save justinruggles/3768991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c | |
index eb2d2f9..58b3837 100644 | |
--- a/libavfilter/af_resample.c | |
+++ b/libavfilter/af_resample.c | |
@@ -209,7 +209,8 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf) | |
if (ret > 0) { | |
buf_out->audio->nb_samples = ret; | |
- if (buf->pts != AV_NOPTS_VALUE) { | |
+ if (inlink->sample_rate == outlink->sample_rate && | |
+ buf->pts != AV_NOPTS_VALUE) { | |
buf_out->pts = av_rescale_q(buf->pts, inlink->time_base, | |
outlink->time_base) - | |
av_rescale(delay, outlink->sample_rate, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment