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:
b461cd4
)
avcodec: refactor avcodec_encode_audio2() to merge common branches
author
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 21 Mar 2012 19:36:25 +0000
(15:36 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Mon, 7 May 2012 16:14:05 +0000
(12:14 -0400)
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
bfd470b
..
fdbdfd5
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-885,8
+885,9
@@
int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
}
}
- ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
- if (!ret && *got_packet_ptr) {
+ ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
+ if (!ret) {
+ if (*got_packet_ptr) {
if (!(avctx->codec->capabilities & CODEC_CAP_DELAY)) {
if (avpkt->pts == AV_NOPTS_VALUE)
avpkt->pts = frame->pts;
@@
-899,7
+900,6
@@
int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
avpkt->size = 0;
}
- if (!ret) {
if (!user_packet && avpkt->size) {
uint8_t *new_data = av_realloc(avpkt->data, avpkt->size);
if (new_data)