av_frame_unref(ost->last_frame);
if (next_picture)
av_frame_ref(ost->last_frame, next_picture);
+ else
+ av_frame_free(&ost->last_frame);
}
static double psnr(double d)
uint64_t data_size = 0;
float percent = -1.0;
int i, j;
+ int pass1_used = 1;
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
}
extra_size += ost->enc_ctx->extradata_size;
data_size += ost->data_size;
+ if ( (ost->enc_ctx->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2))
+ != CODEC_FLAG_PASS1)
+ pass1_used = 0;
}
if (data_size && total_size>0 && total_size >= data_size)
total_packets, total_size);
}
if(video_size + data_size + audio_size + subtitle_size + extra_size == 0){
- av_log(NULL, AV_LOG_WARNING, "Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)\n");
+ av_log(NULL, AV_LOG_WARNING, "Output file is empty, nothing was encoded ");
+ if (pass1_used) {
+ av_log(NULL, AV_LOG_WARNING, "\n");
+ } else {
+ av_log(NULL, AV_LOG_WARNING, "(check -ss / -t / -frames parameters if used)\n");
+ }
}
}