Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-03-21 23:36:25 +0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-05-07 20:14:05 +0400
commitfa0319b4fdb569f9f7a5a5ea94fc5245fb252af8 (patch)
tree1c4b5d312156b6c45eb410b7bb9328e200b0c937 /libavcodec/utils.c
parentb461cd4deb8e8d9698797429b4fe85bfb9208fe6 (diff)
avcodec: refactor avcodec_encode_audio2() to merge common branches
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index bfd470b24e..fdbdfd54a2 100644
--- 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)