Signed-off-by: Andreas Rheinhardt <[email protected]>
---
libavformat/webpenc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c
index fb0cca3922..9ac353c967 100644
--- a/libavformat/webpenc.c
+++ b/libavformat/webpenc.c
@@ -80,12 +80,13 @@ static int flush(AVFormatContext *s, int trailer, int64_t
pts)
{
WebpContext *w = s->priv_data;
AVStream *st = s->streams[0];
-
- if (w->last_pkt->size) {
int skip = 0;
unsigned flags = 0;
int vp8x = 0;
+ if (!w->last_pkt->size)
+ return 0;
+
if (AV_RL32(w->last_pkt->data) == AV_RL32("RIFF"))
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);
av_packet_unref(w->last_pkt);
- }
return 0;
}
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".