]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/roqvideoenc.c
aac: Provide more information on the failure message
[ffmpeg] / libavcodec / roqvideoenc.c
index fd651e9552607c47ef4ba181e28e2cbde4b69016..32dabae09cc9f18f572e243f8ec8ce828687b52f 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");