git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e9cd4e
)
avcodec/cngenc: Use ff_alloc_packet2()
author
Michael Niedermayer
<michael@niedermayer.cc>
Sun, 2 Aug 2015 21:02:12 +0000
(23:02 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Sun, 2 Aug 2015 21:02:12 +0000
(23:02 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cngenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/cngenc.c
b/libavcodec/cngenc.c
index
58918aa
..
302c703
100644
(file)
--- a/
libavcodec/cngenc.c
+++ b/
libavcodec/cngenc.c
@@
-75,7
+75,7
@@
static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
int qdbov;
int16_t *samples = (int16_t*) frame->data[0];
- if ((ret = ff_alloc_packet
(avpkt
, 1 + p->order))) {
+ if ((ret = ff_alloc_packet
2(avctx, avpkt, 1 + p->order
, 1 + p->order))) {
av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
return ret;
}
@@
-97,7
+97,7
@@
static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
avpkt->data[1 + i] = p->ref_coef[i] * 127 + 127;
*got_packet_ptr = 1;
- av
pkt->size = 1 + p->order
;
+ av
_assert1(avpkt->size == 1 + p->order)
;
return 0;
}