diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2012-10-24 18:30:06 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-01 19:21:12 +0400 |
commit | 84e7d368d6b4e7a4247ed9e2e1a31b8592a4321d (patch) | |
tree | d0c9a71980f74e3be3030de241824770d7078f8e /libavformat/mxfdec.c | |
parent | e5cf100d3daaf3fa48d44ae575af916473f85544 (diff) |
mxfdec: Fix inferred misuses of enums
This fixes CID 700457, 700458 and 703705.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r-- | libavformat/mxfdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 5fca1a89a6..5116d5783e 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1487,7 +1487,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) /* TODO: drop PictureEssenceCoding and SoundEssenceCompression, only check EssenceContainer */ codec_ul = mxf_get_codec_ul(ff_mxf_codec_uls, &descriptor->essence_codec_ul); - st->codec->codec_id = codec_ul->id; + st->codec->codec_id = (enum AVCodecID)codec_ul->id; if (descriptor->extradata) { st->codec->extradata = descriptor->extradata; st->codec->extradata_size = descriptor->extradata_size; @@ -1525,7 +1525,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) if (st->codec->pix_fmt == AV_PIX_FMT_NONE) { pix_fmt_ul = mxf_get_codec_ul(ff_mxf_pixel_format_uls, &descriptor->essence_codec_ul); - st->codec->pix_fmt = pix_fmt_ul->id; + st->codec->pix_fmt = (enum AVPixelFormat)pix_fmt_ul->id; if (st->codec->pix_fmt == AV_PIX_FMT_NONE) { /* support files created before RP224v10 by defaulting to UYVY422 if subsampling is 4:2:2 and component depth is 8-bit */ @@ -1541,8 +1541,8 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { container_ul = mxf_get_codec_ul(mxf_sound_essence_container_uls, essence_container_ul); /* Only overwrite existing codec ID if it is unset or A-law, which is the default according to SMPTE RP 224. */ - if (st->codec->codec_id == AV_CODEC_ID_NONE || (st->codec->codec_id == AV_CODEC_ID_PCM_ALAW && container_ul->id != AV_CODEC_ID_NONE)) - st->codec->codec_id = container_ul->id; + if (st->codec->codec_id == AV_CODEC_ID_NONE || (st->codec->codec_id == AV_CODEC_ID_PCM_ALAW && (enum AVCodecID)container_ul->id != AV_CODEC_ID_NONE)) + st->codec->codec_id = (enum AVCodecID)container_ul->id; st->codec->channels = descriptor->channels; st->codec->bits_per_coded_sample = descriptor->bits_per_sample; |