From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id DC3BE4CF84 for ; Thu, 13 Feb 2025 22:48:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9256168C176; Fri, 14 Feb 2025 00:48:15 +0200 (EET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 84F1968C14C for ; Fri, 14 Feb 2025 00:48:08 +0200 (EET) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-220ecbdb4c2so5584215ad.3 for ; Thu, 13 Feb 2025 14:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739486886; x=1740091686; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=iyhTtOlUHC5h2j4MzcoowqBFd248ad7MzEEjKXq3LiY=; b=JNkG7Dv/N1Qn3NpMpGDpCMEOS6pqoAVYASO0HuQcnkq1FbSjCvw57hA2sMeB4NwQYf sq4c/zPyfMbraR4IKM4JZdOxmA6falfQhZikiyyklQrAQ/StfAPf8LutZMJgqpKzniNd W/XGrHBuHecBuD6Sq/VYVrNDXvMBjNYQug+qJOLslerhIJjIOsYA9W2qA097FaxXNX3n 4qxW0lRDL8w6M3rMdCVHq6lUOGNHJC7nXdaDnPQ6k5K0ByzaRXIPDi2VMv/sFzGxinRw 2heQxHakAoeD77MEzUWbZs2tjiPCyfMkPH8d5NKhLqepZWzmA7UG93Q5HJpEOsS1zh2H bK3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739486886; x=1740091686; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iyhTtOlUHC5h2j4MzcoowqBFd248ad7MzEEjKXq3LiY=; b=hZ45Xh8rSn8X5O6lw9cWiaHwMAZYZwGJyX3f5fy7xtEk2wwg8QfeZVwl4e13Cu2ay0 iR5sxPzk/Uz4jx1Rj0b0a2A11XSKJBurE7cK/ufoYS26JdSnyjx8lJZ6c52plp0afZ4+ NVG88eA/GPQT4m3rVdzStjYXCJxTbnssU7NhhfOJX6HgZBibrwZTSUveyBcL2nItb199 ROCCzhQ4hcijLdgiZDQ5NbQ++EPzxMzjN9DUGcwwNlIRmzOsHcl5p7E3aZ/Tfk/mT+si 0MXT1ChGs6CiZiMM4/Tgg1Z6hK1FhyxXeQlgbEyodb6T2j2FJfhl0IJcZLFFkS9wAruY vIzw== X-Gm-Message-State: AOJu0YxhlJhY4cbBrcx7zdW+vN5mt/vPv0bMVU8fcULelYtXkMQa7oc5 BeZT7tyFxcgkQ+HhPCXNPvOPiVYkjFJ4KTnHDM5Z9dpFK2rDGAry+rdVTKi6 X-Gm-Gg: ASbGncuI7mxoAbSgfmiF1ES2ShMm+ph4vjaabyHQoOAb7yy9j1br0YyHFFnhR5fXV/a lCyWrqA0YpW0cjyBQ57rawMrGiI06ppf3ZyfdCgeFv8dYJU85/4jXY6CKphIu2FEKDTAS0ehNXs dP+McVuL8fIjYiubLQRgXYV8RpgKGZ5+aK/Wr4yEakccyNFNjqgKBhrLWVAofAyrwqa/1vVuapk RPPX6zZUYSDds8DMQXpHbMVSC5No1mmj+ZH2erOqpcW/uEWumZW1RwerZJlimxjVv8f0ZbauGiP VWEbk4gYF4eBbECoHYNS3ZDONtyCgsI= X-Google-Smtp-Source: AGHT+IH7ozGUT7YrfqiyYgvGjD9GZkFOOoEQOBmrqe41YRs1k9KIvhn1D0mLEkBLK+qh53LrJZ8GQA== X-Received: by 2002:a17:903:2311:b0:215:b058:28a5 with SMTP id d9443c01a7336-220bbb2366amr125480635ad.18.1739486885971; Thu, 13 Feb 2025 14:48:05 -0800 (PST) Received: from localhost.localdomain ([2800:2121:b040:c:1596:bee8:ed07:ae97]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-220d556d6a1sm17165125ad.179.2025.02.13.14.48.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:48:05 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 Feb 2025 19:47:46 -0300 Message-ID: <20250213224746.769-2-jamrial@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250213224746.769-1-jamrial@gmail.com> References: <20250213224746.769-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avformat/demux: don't discard empty Theora packets X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Theora signals "Output last frame again" with an empty packet. Finishes fixing ticket #11451. Signed-off-by: James Almer --- libavformat/demux.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index d8ab29431e..407e448252 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1172,8 +1172,14 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int ret = 0, got_output = flush; if (!size && !flush && sti->parser->flags & PARSER_FLAG_COMPLETE_FRAMES) { - // preserve 0-size sync packets - compute_pkt_fields(s, st, sti->parser, pkt, AV_NOPTS_VALUE, AV_NOPTS_VALUE); + if (st->codecpar->codec_id == AV_CODEC_ID_THEORA) { + compute_pkt_fields(s, st, sti->parser, pkt, pkt->dts, pkt->pts); + ret = avpriv_packet_list_put(&fci->parse_queue, + pkt, NULL, 0); + if (ret < 0) + goto fail; + } else // preserve 0-size sync packets + compute_pkt_fields(s, st, sti->parser, pkt, AV_NOPTS_VALUE, AV_NOPTS_VALUE); } while (size > 0 || (flush && got_output)) { -- 2.48.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".