[FFmpeg-devel] [PATCH] dts parser fails to parse DTS-HD Master streams due to changing frame size
Thu Jul 24 20:11:34 CEST 2008
On Thu, Jul 24, 2008 at 07:26:59PM +0200, elupus wrote:
> On Wed, 11 Jun 2008 17:38:15 +0200, elupus wrote:
> > On Wed, 11 Jun 2008 11:19:22 +0300, Kostya wrote:
> >> On Wed, Jun 11, 2008 at 09:23:03AM +0200, Benjamin Larsson wrote:
> >>> [12 quoted lines suppressed]
> >> The reason is called DCA specification where it is stated that all frame
> >> sizes should be equal.
> > What I see wrong in the parser is that you consider framesize to be from
> > one startcode to the next startcode, not the encoded framesize as given by
> > the dts header.
> > This means that like in the case of DTS HD, where there is extra "junk"
> > after the full core dts frame (which btw, will have same framesize as
> > previous frame), the parser will never find a valid end code.
> > Another error is that if this even happens once in the stream due to bit
> > errors, the parser will then never resync, as pc1->size is unconditionally
> > increased, and compared to the fixed pc1->framesize.
> > Also what happens with a TS stream transmitted over tv network, when they
> > for example change bitrate or channel count? wouldn't that change
> > framesize?
> > Joakim
> Kostya, could you comment on this?
The reason that core DCA frames should have equal size stays, we can't disregard it
and there's at least one stream that has marker inside frame.
As for DTS HD, I don't know a way to determine fixed frame size (for now) neither
have samples to test. I'm not against supporting it, not at all.
DTS stream with errors, I think it may be easily fixed by replacing size == framesize
with size >= framesize. I am just too lazy to create and test such sample.
You can also try your luck with Benjamin Larsson, he's DCA co-maintainer.
More information about the ffmpeg-devel