[FFmpeg-devel] [PATCH 1/3] avformat/mxfenc: Replace more literal magic numbers by enum values.
Michael Niedermayer
michael at niedermayer.cc
Tue Sep 12 19:36:57 EEST 2017
On Sun, Sep 10, 2017 at 10:28:05PM +0200, Tomas Härdin wrote:
> On Sun, 2017-09-10 at 22:10 +0200, Michael Niedermayer wrote:
> > enum {
> > INDEX_MPEG2 = 0,
> > INDEX_AES3,
> > @@ -159,6 +139,26 @@ enum {
> > INDEX_H264,
> > };
> >
> > +static const struct {
> > + enum AVCodecID id;
> > + int index;
> > +} mxf_essence_mappings[] = {
> > + { AV_CODEC_ID_MPEG2VIDEO, INDEX_MPEG2 },
> > + { AV_CODEC_ID_PCM_S24LE, INDEX_AES3 },
> > + { AV_CODEC_ID_PCM_S16LE, INDEX_AES3 },
> > + { AV_CODEC_ID_DVVIDEO, INDEX_DV },
> > + { AV_CODEC_ID_DNXHD, INDEX_DNXHD_1080p_10bit_HIGH },
> > + { AV_CODEC_ID_JPEG2000, INDEX_JPEG2000 },
> > + { AV_CODEC_ID_H264, INDEX_H264 },
> > + { AV_CODEC_ID_NONE }
> > +};
>
> This is tangentally relevant perhaps, but that INDEX_ enum should
> really be type. Something like ULIndex and a comment with reference to
> relevant spec section would be nice
yes, ill change that and ill apply the patchest
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170912/9da0762b/attachment.sig>
More information about the ffmpeg-devel
mailing list