[FFmpeg-cvslog] mpegvideo_enc: : switch to ff_alloc_packet2()

Michael Niedermayer git at videolan.org
Thu Mar 22 19:10:26 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 22 04:25:31 2012 +0100| [e22113cf1d5b3ad81ea29d7dcb422c14e011f168] | committer: Michael Niedermayer

mpegvideo_enc: : switch to ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e22113cf1d5b3ad81ea29d7dcb422c14e011f168
---

 libavcodec/mpegvideo_enc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 4a79dff..79ebaf0 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1435,8 +1435,7 @@ int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
 
     /* output? */
     if (s->new_picture.f.data[0]) {
-        if (!pkt->data &&
-            (ret = ff_alloc_packet(pkt, s->mb_width*s->mb_height*(MAX_MB_BYTES+100)+10000)) < 0)
+        if ((ret = ff_alloc_packet2(avctx, pkt, s->mb_width*s->mb_height*(MAX_MB_BYTES+100)+10000)) < 0)
             return ret;
         if (s->mb_info) {
             s->mb_info_ptr = av_packet_new_side_data(pkt,



More information about the ffmpeg-cvslog mailing list