1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avcodec/libvpxenc: Avoid one level of indentation

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2021-04-28 00:06:36 +02:00
parent 3280c6f938
commit e099a29f5a

View File

@@ -1176,8 +1176,11 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame,
{ {
int ret = ff_get_encode_buffer(avctx, pkt, cx_frame->sz, 0); int ret = ff_get_encode_buffer(avctx, pkt, cx_frame->sz, 0);
uint8_t *side_data; uint8_t *side_data;
if (ret >= 0) {
int pict_type; int pict_type;
if (ret < 0)
return ret;
memcpy(pkt->data, cx_frame->buf, pkt->size); memcpy(pkt->data, cx_frame->buf, pkt->size);
pkt->pts = pkt->dts = cx_frame->pts; pkt->pts = pkt->dts = cx_frame->pts;
@@ -1192,11 +1195,9 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame,
cx_frame->have_sse ? 3 : 0, pict_type); cx_frame->have_sse ? 3 : 0, pict_type);
if (cx_frame->have_sse) { if (cx_frame->have_sse) {
int i;
/* Beware of the Y/U/V/all order! */ /* Beware of the Y/U/V/all order! */
for (i = 0; i < 3; ++i) { for (int i = 0; i < 3; ++i)
avctx->error[i] += cx_frame->sse[i + 1]; avctx->error[i] += cx_frame->sse[i + 1];
}
cx_frame->have_sse = 0; cx_frame->have_sse = 0;
} }
if (cx_frame->sz_alpha > 0) { if (cx_frame->sz_alpha > 0) {
@@ -1210,9 +1211,6 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame,
AV_WB64(side_data, 1); AV_WB64(side_data, 1);
memcpy(side_data + 8, cx_frame->buf_alpha, cx_frame->sz_alpha); memcpy(side_data + 8, cx_frame->buf_alpha, cx_frame->sz_alpha);
} }
} else {
return ret;
}
return pkt->size; return pkt->size;
} }