Browse Source

bmpenc: switch to ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
f79b09b7af
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavcodec/bmpenc.c

+ 1
- 2
libavcodec/bmpenc.c View File

@@ -120,8 +120,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
#define SIZE_BITMAPINFOHEADER 40
hsize = SIZE_BITMAPFILEHEADER + SIZE_BITMAPINFOHEADER + (pal_entries << 2);
n_bytes = n_bytes_image + hsize;
if ((ret = ff_alloc_packet(pkt, n_bytes)) < 0) {
av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n");
if ((ret = ff_alloc_packet2(avctx, pkt, n_bytes)) < 0) {
return ret;
}
buf = pkt->data;


Loading…
Cancel
Save