1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00

avformat/webpenc: Return early to reduce indentation

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-11-03 16:08:22 +01:00
parent 5f4b7bf2b5
commit 18d7a97f9e

View File

@ -80,12 +80,13 @@ static int flush(AVFormatContext *s, int trailer, int64_t pts)
{ {
WebpContext *w = s->priv_data; WebpContext *w = s->priv_data;
AVStream *st = s->streams[0]; AVStream *st = s->streams[0];
if (w->last_pkt->size) {
int skip = 0; int skip = 0;
unsigned flags = 0; unsigned flags = 0;
int vp8x = 0; int vp8x = 0;
if (!w->last_pkt->size)
return 0;
if (AV_RL32(w->last_pkt->data) == AV_RL32("RIFF")) if (AV_RL32(w->last_pkt->data) == AV_RL32("RIFF"))
skip = 12; skip = 12;
@ -139,7 +140,6 @@ static int flush(AVFormatContext *s, int trailer, int64_t pts)
} }
avio_write(s->pb, w->last_pkt->data + skip, w->last_pkt->size - skip); avio_write(s->pb, w->last_pkt->data + skip, w->last_pkt->size - skip);
av_packet_unref(w->last_pkt); av_packet_unref(w->last_pkt);
}
return 0; return 0;
} }