]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/v410enc.c
bsd: use number of logical CPUs as automatic thread count
[ffmpeg] / libavcodec / v410enc.c
index 1e600c35b6b8c93549dbe55e70039e544d3fb7a5..95b36c138e984af281f819b72dc8aa7354f24cb6 100644 (file)
@@ -20,8 +20,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/intreadwrite.h"
 #include "avcodec.h"
-#include "put_bits.h"
 
 static av_cold int v410_encode_init(AVCodecContext *avctx)
 {
@@ -50,7 +50,7 @@ static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf,
     int i, j;
     int output_size = 0;
 
-    if (buf_size < avctx->width * avctx->height * 3) {
+    if (buf_size < avctx->width * avctx->height * 4) {
         av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n");
         return AVERROR(ENOMEM);
     }