|
|
|
@ -1021,13 +1021,13 @@ int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (avctx) { |
|
|
|
|
av_assert0(!avpkt->data || avpkt->data != avctx->internal->byte_buffer); |
|
|
|
|
if (!avpkt->data || avpkt->size < size) { |
|
|
|
|
av_fast_padded_malloc(&avctx->internal->byte_buffer, &avctx->internal->byte_buffer_size, size); |
|
|
|
|
avpkt->data = avctx->internal->byte_buffer; |
|
|
|
|
avpkt->size = avctx->internal->byte_buffer_size; |
|
|
|
|
avpkt->destruct = NULL; |
|
|
|
|
} |
|
|
|
|
av_assert0(!avpkt->data || avpkt->data != avctx->internal->byte_buffer); |
|
|
|
|
if (!avpkt->data || avpkt->size < size) { |
|
|
|
|
av_fast_padded_malloc(&avctx->internal->byte_buffer, &avctx->internal->byte_buffer_size, size); |
|
|
|
|
avpkt->data = avctx->internal->byte_buffer; |
|
|
|
|
avpkt->size = avctx->internal->byte_buffer_size; |
|
|
|
|
avpkt->destruct = NULL; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (avpkt->data) { |
|
|
|
|