ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Mon 
Aug  3 14:06:28 2015 +0200| [4302a92835313000d4bf8030baae32c2b130d8a1] | 
committer: Michael Niedermayer

avcodec/pcm: Better min_size for ff_alloc_packet2()

33318 -> 30601 decicycles

Signed-off-by: Michael Niedermayer <[email protected]>

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

 libavcodec/pcm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 81d9f92..2cb5a36 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -97,7 +97,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket 
*avpkt,
     n           = frame->nb_samples * avctx->channels;
     samples     = (const short *)frame->data[0];
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size, 0)) < 0)
+    if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size, n * 
sample_size)) < 0)
         return ret;
     dst = avpkt->data;
 

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to