On 4/16/2021 11:36 AM, Carl Eugen Hoyos wrote:


Am 16.04.2021 um 16:15 schrieb James Almer <[email protected]>:

ffmpeg | branch: master | James Almer <[email protected]> | Sat Apr 10 
22:53:34 2021 -0300| [55d667d86af7d13fc5aa2b4071a5b97eb10e2da6] | committer: James 
Almer

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.

Signed-off-by: James Almer <[email protected]>

http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=55d667d86af7d13fc5aa2b4071a5b97eb10e2da6
---

libavformat/webpenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c
index ed8325c02d..ca4ffc4e2d 100644
--- a/libavformat/webpenc.c
+++ b/libavformat/webpenc.c
@@ -172,7 +172,7 @@ static int webp_write_trailer(AVFormatContext *s)
     WebpContext *w = s->priv_data;

     if (w->using_webp_anim_encoder) {
-        if ((w->frame_count > 1) && w->loop) {  // Write loop count.
+        if (w->loop) {  // Write loop count.
             avio_seek(s->pb, 42, SEEK_SET);
             avio_wl16(s->pb, w->loop);
         }

I wonder now why you are asking for reviews, more so given that you tend to 
block patches you consider not good enough.

Carl Eugen

I sent this patch a week ago. The only comment was your suggestion to move the loop count writing to write_packet(). That's still a possibility, but it's orthogonal to the regression this patch fixed, given it's a change to enable this muxer to work with non-seekable output.
_______________________________________________
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".

Reply via email to