[FFmpeg-devel] [PATCH 4/4] movtextdec: Don't emit errors for normal duration-end packets.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Aug 15 20:21:36 CEST 2012

On Wed, Aug 15, 2012 at 10:53:35AM -0700, Philip Langdale wrote:
> On Wed, 15 Aug 2012 18:44:50 +0200
> Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> > On Sun, Aug 12, 2012 at 02:26:29PM -0700, Philip Langdale wrote:
> > > The logic here was off. If the packet size is exactly two, then
> > > it's a well-formed empty subtitle, used to mark the end of the
> > > duration of the previous subtitle.
> > 
> > Is that really regardless of what those 2 bytes contain?
> Well, it's a little philosophical. Certainly, regardless of what
> those two bytes contain, you should treat them as being 00 00.
> Would you prefer an explicit check and error? It just feels a bit
> weird to go to the trouble when it won't change the decoder behaviour.

I think I prefer it slightly, since it highlights e.g. when someone
(e.g. us) generates invalid files where they are not 0.
Or if they come from a broken demuxer.
But that I don't mind much. I'd be in favour of at least documenting
the expected value, something like "Those 2 bytes should be 0, but
it doesn't really matter".

More information about the ffmpeg-devel mailing list