wg <[EMAIL PROTECTED]> added the comment:

> Michael Niedermayer <[EMAIL PROTECTED]> added the comment:

First: thanks for addressing all my questions.

With regard to samples/bugreport, I could provide some but you would
need about 50k of patches just to get some output, let alone see the
problems.  I'm transcoding from DVB mpegts with DVB subtitles and
teletext subtitles to DVD subtitles.  Of course, there is no index in
this case and no duration for the subtitle packets.

> > If you care so much about AVPacket.duration, then why is it _not used_ in
> > ffmpeg.c to compute AVInputStream.next_pts?
> > IOW, duration is currently _never_ used to decide whether there is
> > a discontinuity!
> 
> yes,

Ok, so lets get back to your initial response which closed and rejected
this issue:

>AVPacket.duration specifies the packet duration. If after reordering the pts +
>duration doesnt match the next pts, that is a discontinuity and should be
>treated as such. If the duration isnt known then the discontinuity detection
>should likely be disabled. Subtitle streams are NOT a special case. Your patch
>intruduces bugs (that is ignore discontinuities in subtitle streams)

This is not true -- there weren't any discontinuities to be ignored,
because AVPacket.duration currently _isn't used at all_.  So
definitely no new bug introduced.

>but does
>not fix any.

Yes it does, by disabling the wrong check.
Believe me, I dislike special-casing as much as you do.

> What i meant really is a pkt.duration check where the
> ist->next_pts != AV_NOPTS_VALUE check is.

But that is the duration of the _current_ packet.  You would really
need the duration of the previous packet at that place to decide
whether a discontinuity is possible (I assume you mean ffmpeg.c
l. 1977), no?

> An alternative might be a flag for the container indicating that it doesnt
> allow discontinuities. This still would be more correct than a check for
> subtitles.

I don't see how that would help me, my input formats do allow
discontinuities so I couldn't disable such a flag.

Can you please either:

- reopen this issue

- advise me to open a new issue with a more ambitious approach
  which would use pkt.duration as much as possible to decide
  on discontinuities (and which would not be closed within a few
  hours :)

- confirm that I am wasting my time opening such an issue

Thanks.

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue356>
______________________________________________________

Reply via email to