libtheoraenc: switch to ff_alloc_packet2().

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-03-22 15:00:47 +01:00
parent f3b10d38d7
commit b611ffc5d0

View File

@ -328,8 +328,7 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
}
/* Copy ogg_packet content out to buffer */
if ((ret = ff_alloc_packet(pkt, o_packet.bytes)) < 0) {
av_log(avc_context, AV_LOG_ERROR, "Error getting output packet of size %ld.\n", o_packet.bytes);
if ((ret = ff_alloc_packet2(avc_context, pkt, o_packet.bytes)) < 0) {
return ret;
}
memcpy(pkt->data, o_packet.packet, o_packet.bytes);