[FFmpeg-devel] [PATCH] avformat/mxfdec: Detect jpeg2000 through codec_ul too

Michael Niedermayer michaelni at gmx.at
Mon Jun 15 14:13:32 CEST 2015


On Mon, Jun 15, 2015 at 09:57:17AM +0100, tim nicholson wrote:
> On 12/06/15 18:05, Michael Niedermayer wrote:
> 
> > Fixes Ticket2345
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavformat/mxfdec.c |   14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> > index 78e2393..7389555 100644
> > --- a/libavformat/mxfdec.c
> > +++ b/libavformat/mxfdec.c
> > @@ -166,6 +166,7 @@ typedef struct MXFDescriptor {
> >      enum MXFMetadataSetType type;
> >      UID essence_container_ul;
> >      UID essence_codec_ul;
> > +    UID codec_ul;
> >      AVRational sample_rate;
> >      AVRational aspect_ratio;
> >      int width;
> > @@ -974,6 +975,9 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int
> >      case 0x3004:
> >          avio_read(pb, descriptor->essence_container_ul, 16);
> >          break;
> > +    case 0x3005:
> > +        avio_read(pb, descriptor->codec_ul, 16);
> > +        break;
> >      case 0x3006:
> >          descriptor->linked_track_id = avio_rb32(pb);
> >          break;
> > @@ -1151,6 +1155,11 @@ static const MXFCodecUL mxf_data_essence_container_uls[] = {
> >      { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0, AV_CODEC_ID_NONE },
> >  };
> >  
> > +static const MXFCodecUL mxf_codec_uls[] = {
> > +    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x09,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 },
> _________________________________________/
> 
> mxf.c already has:-
> 
> { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */
> ________________________________________/
> 
> and my copy of RP224v12 agrees with that registry version byte. Since the
> version byte is ignored this should make no functional difference, but it is
> inconsistent with what we already have, and the published spec.

patch sent

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150615/efb65518/attachment.asc>


More information about the ffmpeg-devel mailing list