summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-10-09 14:24:00 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-10-09 14:33:18 (GMT)
commit8780f7fbfaacb1f31d9915a368850f23557bc0d5 (patch)
tree9800d3a7ef6bde1c72461ba34705ad55888d0523
parent8c7bc7d3e50fa89f9bcf245f0340ed9829a7d574 (diff)
downloadffmpeg-8780f7fbfaacb1f31d9915a368850f23557bc0d5.zip
ffmpeg-8780f7fbfaacb1f31d9915a368850f23557bc0d5.tar.gz
ffmpeg-8780f7fbfaacb1f31d9915a368850f23557bc0d5.tar.bz2
avfilter/ff_filter_frame_needs_framing: fix handling of AV_NOPTS_VALUE
Fixes Ticket3015 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libavfilter/avfilter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index b5b3734..7ce82f8 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -1092,8 +1092,9 @@ static int ff_filter_frame_needs_framing(AVFilterLink *link, AVFrame *frame)
return 0;
}
av_frame_copy_props(pbuf, frame);
- pbuf->pts = frame->pts +
- av_rescale_q(inpos, samples_tb, link->time_base);
+ pbuf->pts = frame->pts;
+ if (pbuf->pts != AV_NOPTS_VALUE)
+ pbuf->pts += av_rescale_q(inpos, samples_tb, link->time_base);
pbuf->nb_samples = 0;
}
nb_samples = FFMIN(insamples,