Browse code

ffmpeg: drop redundant frame_pts value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2015/01/17 00:32:50
Showing 1 changed files
... ...
@@ -1214,7 +1214,6 @@ static int reap_filters(void)
1214 1214
 {
1215 1215
     AVFrame *filtered_frame = NULL;
1216 1216
     int i;
1217
-    int64_t frame_pts;
1218 1217
 
1219 1218
     /* Reap all buffers present in the buffer sinks */
1220 1219
     for (i = 0; i < nb_output_streams; i++) {
... ...
@@ -1247,10 +1246,10 @@ static int reap_filters(void)
1247 1247
                 av_frame_unref(filtered_frame);
1248 1248
                 continue;
1249 1249
             }
1250
-            frame_pts = AV_NOPTS_VALUE;
1250
+
1251 1251
             if (filtered_frame->pts != AV_NOPTS_VALUE) {
1252 1252
                 int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time;
1253
-                filtered_frame->pts = frame_pts =
1253
+                filtered_frame->pts =
1254 1254
                     av_rescale_q(filtered_frame->pts, filter->inputs[0]->time_base, enc->time_base) -
1255 1255
                     av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base);
1256 1256
             }
... ...
@@ -1259,7 +1258,6 @@ static int reap_filters(void)
1259 1259
 
1260 1260
             switch (filter->inputs[0]->type) {
1261 1261
             case AVMEDIA_TYPE_VIDEO:
1262
-                filtered_frame->pts = frame_pts;
1263 1262
                 if (!ost->frame_aspect_ratio.num)
1264 1263
                     enc->sample_aspect_ratio = filtered_frame->sample_aspect_ratio;
1265 1264
 
... ...
@@ -1272,7 +1270,6 @@ static int reap_filters(void)
1272 1272
                 do_video_out(of->ctx, ost, filtered_frame);
1273 1273
                 break;
1274 1274
             case AVMEDIA_TYPE_AUDIO:
1275
-                filtered_frame->pts = frame_pts;
1276 1275
                 if (!(enc->codec->capabilities & CODEC_CAP_PARAM_CHANGE) &&
1277 1276
                     enc->channels != av_frame_get_channels(filtered_frame)) {
1278 1277
                     av_log(NULL, AV_LOG_ERROR,