Merge remote-tracking branch 'qatar/release/9' into release/1.1
[ffmpeg.git] / libavcodec / libmp3lame.c
index 034fee7..eea9d03 100644 (file)
@@ -218,7 +218,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
         }
     } else {
         lame_result = lame_encode_flush(s->gfp, s->buffer + s->buffer_index,
-                                        BUFFER_SIZE - s->buffer_index);
+                                        s->buffer_size - s->buffer_index);
     }
     if (lame_result < 0) {
         if (lame_result == -1) {