On Fri, 2015-07-10 at 20:11 +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch allows decoding of the sample provided on ffmpeg-user:
> http://ffmpeg.org/pipermail/ffmpeg-user/2015-July/027472.html
>
> Better suggestions welcome, Carl Eugen
Just a quick review since I have to bounce:
> +const MXFCodecUL ff_mxf_codec_tag_uls[] = {
Haven't we moved this to mxf.c already? Or rather, don't we have a whole
bunch of very similar tables already?
> st->codec->pix_fmt = (enum AVPixelFormat)pix_fmt_ul->id;
> - if (st->codec->pix_fmt == AV_PIX_FMT_NONE) {
> + if (st->codec->pix_fmt == AV_PIX_FMT_NONE)
> + st->codec->codec_tag =
> mxf_get_codec_ul(ff_mxf_codec_tag_uls,
> +
> &descriptor->essence_codec_ul)->id;
> + if (st->codec->pix_fmt == AV_PIX_FMT_NONE &&
> !st->codec->codec_tag) {
> /* support files created before RP224v10 by
> defaulting to UYVY422
> if subsampling is 4:2:2 and component depth is
> 8-bit */
> if (descriptor->horiz_subsampling == 2 &&
Messy bracing. Something like putting a check on codec_tag after setting
it, inside braces like before. Hard to explain and I don't have time to
type it out but:
if (st->codec->pix_fmt == AV_PIX_FMT_NONE) {
codec_tag = ...
if (!codec_tag) {
do the old thing
}
}
Gotta go!
/Tomas
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel