History

avformat/webpenc: don't assume animated webp streams will have more than one packet

The libwebp_animencoder returns a single packet with the entire animated stream, as that's what the external library produces. As such, only ensure the stream was produced by said encoder (or propagated by a demuxer, once support is added) when attempting to write the requested loop value. Fixes ticket #9179.

James Almer committed 5 years ago

Commit 55d667d1 parent 2e17b161 file · +1 −1Browse files

Unified · Split

libavformat/webpenc.c+1−1
@@ -172,7 +172,7 @@ static int webp_write_trailer(AVFormatContext *s) · 171 unmodified lines
172 WebpContext *w = s->priv_data;172 WebpContext *w = s->priv_data;
173 173
174 if (w->using_webp_anim_encoder) {174 if (w->using_webp_anim_encoder) {
175 if ((w->frame_count > 1) && w->loop) { // Write loop count.175 if (w->loop) { // Write loop count.
176 avio_seek(s->pb, 42, SEEK_SET);176 avio_seek(s->pb, 42, SEEK_SET);
177 avio_wl16(s->pb, w->loop);177 avio_wl16(s->pb, w->loop);
178 }178 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t