[FFmpeg-devel] [PATCH] mxfdec: do not try to use an obviously broken index.
Tomas Härdin
tomas.hardin at codemill.se
Sat Dec 10 17:13:22 CET 2011
On Sat, 2011-12-10 at 13:18 +0100, Reimar Döffinger wrote:
> On Sat, Dec 10, 2011 at 12:51:42PM +0100, Tomas Härdin wrote:
> > On Sat, 2011-12-10 at 11:52 +0100, Reimar Döffinger wrote:
> > > Also fixes a memleak.
> > >
> > > Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> > > ---
> > > libavformat/mxfdec.c | 27 +++++++++++++++++++++++----
> > > 1 files changed, 23 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> > > index 7b32a5a..d914920 100644
> > > --- a/libavformat/mxfdec.c
> > > +++ b/libavformat/mxfdec.c
> > > @@ -200,6 +200,7 @@ typedef struct {
> > > int current_edit_unit;
> > > int current_stream;
> > > int d10;
> > > + int broken_index;
> >
> > Maybe just merge these two into a common variable called
> > "demux_indexless" or something? Not a bit deal though.
>
> I do not know what that d10 thing does, but it is also used
> in one more place so I doubt that merging it will work as expected.
> Personally I suspect it is a lazy hack because nobody was willing
> to find and fix the real issue and "ok, let's just make a special
> case for this file" seemed like a good idea.
Yes, it's a hack. The problem is that D-10 is a sort of nested container
thing (think DV, but not as bad). A better solution would be to compute
the indexes so that the IMX50 and AES3 packets are pointed to properly.
The hack is a stop gap until then.
This brings to mind that we should probably introduce an S331m (aka
AES3) decoder - it'd be very similar to s302m.c..
/Tomas
More information about the ffmpeg-devel
mailing list