Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avformat/gifdec: cleanup
Date: Mon, 22 May 2023 13:07:50 -0300
Message-ID: <ec0ed465-c795-aa8a-c17f-8c69b0b0baa8@gmail.com> (raw)
In-Reply-To: <CAPYw7P5SNno30A6KL8zMdtuyfmaQmhq4-04gn+DGNZwtsmT27w@mail.gmail.com>

On 5/22/2023 12:49 PM, Paul B Mahol wrote:
> On 5/21/23, Paul B Mahol <onemda@gmail.com> wrote:
>> Attached patches.
>>
>> This finally removes giant hacks in gif demuxer and allows using gif
>> files via pipe reliably.
>>
> 
> Now with smaller diff.

[...]

> From f3d6eea43df686b4211601b194fac81f032eb273 Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <onemda@gmail.com>
> Date: Sun, 21 May 2023 02:15:26 +0200
> Subject: [PATCH 1/2] avformat/demux: add support to derive timestamps from
>  packet durations for video
> 
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavformat/demux.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libavformat/demux.c b/libavformat/demux.c
> index dec02a1a6b..b3f563ccc7 100644
> --- a/libavformat/demux.c
> +++ b/libavformat/demux.c
> @@ -1195,6 +1195,11 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt,
>                                       st->time_base,
>                                       AV_ROUND_DOWN);
>              }
> +        } else if ((s->iformat->flags & AVFMT_NOTIMESTAMPS) && st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {

Why only for AVFMT_NOTIMESTAMPS formats? Same as the audio check above, 
the parser could set duration regardless of where the packet came from.

> +            if (st->time_base.num > 0 && st->time_base.den > 0 &&
> +                sti->parser->duration) {
> +                out_pkt->duration = sti->parser->duration;
> +            }
>          }
>  
>          out_pkt->stream_index = st->index;
> -- 
> 2.39.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".

  parent reply	other threads:[~2023-05-22 16:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-21  9:38 Paul B Mahol
2023-05-21 10:05 ` Anton Khirnov
2023-05-21 11:24 ` Paul B Mahol
2023-05-21 17:36   ` Michael Niedermayer
2023-05-21 17:59     ` Paul B Mahol
2023-05-21 19:25 ` Paul B Mahol
2023-05-21 19:37   ` James Almer
2023-05-21 20:02     ` Paul B Mahol
2023-05-21 20:06       ` James Almer
2023-05-21 21:42         ` Paul B Mahol
2023-05-22 15:49 ` Paul B Mahol
2023-05-22 16:04   ` James Almer
2023-05-22 16:07   ` James Almer [this message]
2023-05-22 16:10     ` Anton Khirnov
2023-05-22 16:19 ` Paul B Mahol
2023-05-22 20:01   ` James Almer
2023-05-23 21:51   ` Michael Niedermayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec0ed465-c795-aa8a-c17f-8c69b0b0baa8@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git