[FFmpeg-cvslog] libxavs: switch to ff_alloc_packet2().

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


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 22 15:00:48 2012 +0100| [d29719121dd58fee740f455259e9e46878165e59] | committer: Michael Niedermayer

libxavs: 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=d29719121dd58fee740f455259e9e46878165e59
---

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

diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index 0fc6930..f7bdf82 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -87,8 +87,7 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt,
     for (i = 0; i < nnal; i++)
         size += nals[i].i_payload;
 
-    if ((ret = ff_alloc_packet(pkt, size)) < 0) {
-        av_log(ctx, AV_LOG_ERROR, "Error getting output packet of size %d.\n", size);
+    if ((ret = ff_alloc_packet2(ctx, pkt, size)) < 0) {
         return ret;
     }
     p = pkt->data;
@@ -144,7 +143,7 @@ static int XAVS_frame(AVCodecContext *ctx, AVPacket *pkt,
 
     if (!ret) {
         if (!frame && !(x4->end_of_stream)) {
-            if ((ret = ff_alloc_packet(pkt, 4)) < 0)
+            if ((ret = ff_alloc_packet2(ctx, pkt, 4)) < 0)
                 return ret;
 
             pkt->data[0] = 0x0;



More information about the ffmpeg-cvslog mailing list