From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#6258: create-animated-image hangs Date: Mon, 24 May 2010 19:03:21 +0300 Organization: JURTA Message-ID: <87d3wmq8v2.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1274718469 873 80.91.229.12 (24 May 2010 16:27:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 May 2010 16:27:49 +0000 (UTC) To: 6258@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 24 18:27:46 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaVB-00031A-Pj for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 May 2010 18:27:45 +0200 Original-Received: from localhost ([127.0.0.1]:48488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGaV8-0006o5-C5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 May 2010 12:27:38 -0400 Original-Received: from [140.186.70.92] (port=37749 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGaUu-0006it-6r for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:27:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGaUl-0002SP-7J for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:27:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56768) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaUl-0002SL-5M for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:27:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OGaH0-0002Yd-IH; Mon, 24 May 2010 12:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 May 2010 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6258 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12747175479818 (code B ref -1); Mon, 24 May 2010 16:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 May 2010 16:12:27 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGQ-0002YI-Rf for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:27 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGP-0002YB-Kx for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:26 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:43229) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OGaGK-0000yR-P9 for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:20 -0400 Original-Received: from [140.186.70.92] (port=38162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGaGJ-0005VN-BS for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGaGB-0007pC-FE for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:19 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:35733 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGB-0007oP-9N for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:11 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.28.195.cable.starman.ee [82.131.28.195]) by mx1.starman.ee (Postfix) with ESMTP id 5E7193F40CF for ; Mon, 24 May 2010 19:12:07 +0300 (EEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 24 May 2010 12:13:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37228 Archived-At: When the delay between images in an animated GIF file is 0, then calls for `run-with-timer' without delay hangs up. Replacing it with `run-with-idle-timer' doesn't help. An example of the animated GIF that hangs up is http://en.wikipedia.org/wiki/File:Animated_glider_emblem.gif This patch makes a short delay (0.1 sec) in this case. Visually its speed looks the same as the speed of changing images in Firefox when an animated GIF has no delay. === modified file 'lisp/image.el' --- lisp/image.el 2010-04-02 23:28:46 +0000 +++ lisp/image.el 2010-05-24 16:01:45 +0000 @@ -684,10 +684,13 @@ (defun image-animated-p (image) (let* ((metadata (image-metadata image)) (images (plist-get metadata 'count)) (extdata (plist-get metadata 'extension-data)) - (anim (plist-get extdata #xF9))) - (and (integerp images) (> images 1) - (stringp anim) (>= (length anim) 4) - (cons images (+ (aref anim 1) (* (aref anim 2) 256)))))))) + (anim (plist-get extdata #xF9)) + (tmo (and (integerp images) (> images 1) + (stringp anim) (>= (length anim) 4) + (+ (aref anim 1) (* (aref anim 2) 256))))) + (when tmo + (if (eq tmo 0) (setq tmo 10)) + (cons images tmo)))))) (provide 'image) -- Juri Linkov http://www.jurta.org/emacs/