summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-16 16:32:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-16 16:42:20 +0100
commit261e8ccbd1e38c0af719b97ed3fb1720bb733e09 (patch)
treef94619ac640a76c709f82847f80b7f18fee29d79 /ffmpeg.c
parent2d0440f93f93d2f92947dabb481b3e56c099ea26 (diff)
ffmpeg: drop redundant frame_pts value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 2a9fe43bb7..18d2768221 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1214,7 +1214,6 @@ static int reap_filters(void)
{
AVFrame *filtered_frame = NULL;
int i;
- int64_t frame_pts;
/* Reap all buffers present in the buffer sinks */
for (i = 0; i < nb_output_streams; i++) {
@@ -1247,10 +1246,10 @@ static int reap_filters(void)
av_frame_unref(filtered_frame);
continue;
}
- frame_pts = AV_NOPTS_VALUE;
+
if (filtered_frame->pts != AV_NOPTS_VALUE) {
int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time;
- filtered_frame->pts = frame_pts =
+ filtered_frame->pts =
av_rescale_q(filtered_frame->pts, filter->inputs[0]->time_base, enc->time_base) -
av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base);
}
@@ -1259,7 +1258,6 @@ static int reap_filters(void)
switch (filter->inputs[0]->type) {
case AVMEDIA_TYPE_VIDEO:
- filtered_frame->pts = frame_pts;
if (!ost->frame_aspect_ratio.num)
enc->sample_aspect_ratio = filtered_frame->sample_aspect_ratio;
@@ -1272,7 +1270,6 @@ static int reap_filters(void)
do_video_out(of->ctx, ost, filtered_frame);
break;
case AVMEDIA_TYPE_AUDIO:
- filtered_frame->pts = frame_pts;
if (!(enc->codec->capabilities & CODEC_CAP_PARAM_CHANGE) &&
enc->channels != av_frame_get_channels(filtered_frame)) {
av_log(NULL, AV_LOG_ERROR,