summaryrefslogtreecommitdiff
path: root/libavcodec/encode.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/encode.c')
-rw-r--r--libavcodec/encode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index b68bf1e184..1f39ab1a2f 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -339,6 +339,7 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src)
return ret;
avctx->internal->last_audio_frame = 1;
+ return 0;
} else if (src->nb_samples > avctx->frame_size) {
av_log(avctx, AV_LOG_ERROR, "nb_samples (%d) != frame_size (%d)\n", src->nb_samples, avctx->frame_size);
return AVERROR(EINVAL);
@@ -346,11 +347,9 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src)
}
}
- if (!dst->data[0]) {
- ret = av_frame_ref(dst, src);
- if (ret < 0)
- return ret;
- }
+ ret = av_frame_ref(dst, src);
+ if (ret < 0)
+ return ret;
return 0;
}