Merge remote-tracking branch 'qatar/master'
[ffmpeg.git] / libavcodec / ratecontrol.c
index d085f04113215ab4efda49aace50fcf34fc20035..41b7d97d32db358d13f490edd772c1b3c7c65a70 100644 (file)
@@ -861,7 +861,9 @@ static int init_pass2(MpegEncContext *s)
 
         /* find qscale */
         for(i=0; i<rcc->num_entries; i++){
+            RateControlEntry *rce= &rcc->entry[i];
             qscale[i]= get_qscale(s, &rcc->entry[i], rate_factor, i);
+            rcc->last_qscale_for[rce->pict_type] = qscale[i];
         }
         assert(filter_size%2==1);