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.
Unified · Split
| @@ -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 | } |