summaryrefslogtreecommitdiff
path: root/libavcodec/roqvideoenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/roqvideoenc.c')
-rw-r--r--libavcodec/roqvideoenc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index 187b848bac..a652c47c64 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -1051,11 +1051,9 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if (enc->first_frame) {
/* Alloc memory for the reconstruction data (we must know the stride
for that) */
- if (ff_get_buffer(avctx, enc->current_frame, 0) ||
- ff_get_buffer(avctx, enc->last_frame, 0)) {
- av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n");
- return -1;
- }
+ if ((ret = ff_get_buffer(avctx, enc->current_frame, 0)) < 0 ||
+ (ret = ff_get_buffer(avctx, enc->last_frame, 0)) < 0)
+ return ret;
/* Before the first video frame, write a "video info" chunk */
roq_write_video_info_chunk(enc);