[FFmpeg-cvslog] ffmpeg: drop redundant frame_pts value

Michael Niedermayer git at videolan.org
Fri Jan 16 20:06:32 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 16 16:32:50 2015 +0100| [261e8ccbd1e38c0af719b97ed3fb1720bb733e09] | committer: Michael Niedermayer

ffmpeg: drop redundant frame_pts value

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=261e8ccbd1e38c0af719b97ed3fb1720bb733e09
---

 ffmpeg.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 2a9fe43..18d2768 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,



More information about the ffmpeg-cvslog mailing list