ffmpeg: drop redundant frame_pts value
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Jan 2015 15:32:50 +0000 (16:32 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Jan 2015 15:42:20 +0000 (16:42 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 2a9fe43bb7f53b6c8a7a16523b60f0e8375d96e8..18d27682219fbed53629e800c284e18b50c32341 100644 (file)
--- 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,