projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ce4fe4
)
lavc: shrink encoded video packet size after encoding.
author
Anton Khirnov
<anton@khirnov.net>
Thu, 1 Mar 2012 11:15:45 +0000
(12:15 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Thu, 1 Mar 2012 21:21:35 +0000
(22:21 +0100)
Based on a patch by Nicolas George <nicolas.george <at> normalesup.org>
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
2d79f66
..
d797c8a
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-1113,6
+1113,12
@@
int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
else if (!(avctx->codec->capabilities & CODEC_CAP_DELAY))
avpkt->pts = avpkt->dts = frame->pts;
+ if (!user_packet && avpkt->data) {
+ uint8_t *new_data = av_realloc(avpkt->data, avpkt->size);
+ if (new_data)
+ avpkt->data = new_data;
+ }
+
avctx->frame_number++;
}