]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/roqvideoenc.c
ratecontrol: Drop commented out cruft
[ffmpeg] / libavcodec / roqvideoenc.c
index fd651e9552607c47ef4ba181e28e2cbde4b69016..eb021668a7517aef3048a892621bfdf365751a8c 100644 (file)
@@ -955,8 +955,6 @@ static int roq_encode_video(RoqContext *enc)
     reconstruct_and_encode_image(enc, tempData, enc->width, enc->height,
                                  enc->width*enc->height/64);
 
-    enc->avctx->coded_frame = enc->current_frame;
-
     /* Rotate frame history */
     FFSWAP(AVFrame *, enc->current_frame, enc->last_frame);
     FFSWAP(motion_vect *, enc->last_motion4, enc->this_motion4);
@@ -992,6 +990,8 @@ static av_cold int roq_encode_init(AVCodecContext *avctx)
 
     av_lfg_init(&enc->randctx, 1);
 
+    enc->avctx = avctx;
+
     enc->framesSinceKeyframe = 0;
     if ((avctx->width & 0xf) || (avctx->height & 0xf)) {
         av_log(avctx, AV_LOG_ERROR, "Dimensions must be divisible by 16\n");
@@ -1080,7 +1080,7 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     }
     enc->out_buf = pkt->data;
 
-    /* Check for I frame */
+    /* Check for I-frame */
     if (enc->framesSinceKeyframe == avctx->gop_size)
         enc->framesSinceKeyframe = 0;