|
|
@ -1017,6 +1017,7 @@ int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size) |
|
|
|
return AVERROR(EINVAL); |
|
|
|
return AVERROR(EINVAL); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (avctx) { |
|
|
|
av_assert0(!avpkt->data || avpkt->data != avctx->internal->byte_buffer); |
|
|
|
av_assert0(!avpkt->data || avpkt->data != avctx->internal->byte_buffer); |
|
|
|
if (!avpkt->data || avpkt->size < size) { |
|
|
|
if (!avpkt->data || avpkt->size < size) { |
|
|
|
av_fast_padded_malloc(&avctx->internal->byte_buffer, &avctx->internal->byte_buffer_size, size); |
|
|
|
av_fast_padded_malloc(&avctx->internal->byte_buffer, &avctx->internal->byte_buffer_size, size); |
|
|
@ -1024,6 +1025,7 @@ int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size) |
|
|
|
avpkt->size = avctx->internal->byte_buffer_size; |
|
|
|
avpkt->size = avctx->internal->byte_buffer_size; |
|
|
|
avpkt->destruct = NULL; |
|
|
|
avpkt->destruct = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (avpkt->data) { |
|
|
|
if (avpkt->data) { |
|
|
|
void *destruct = avpkt->destruct; |
|
|
|
void *destruct = avpkt->destruct; |
|
|
|