[FFmpeg-devel] [PATCH] omx: Add support for specifying H.264 profile [v2']

Moritz Barsnick barsnick at gmx.net
Wed Feb 8 12:12:12 EET 2017


On Tue, Feb 07, 2017 at 19:05:55 +0900, Takayuki 'January June' Suwa wrote:
> +        switch (s->profile) {
> +        case FF_PROFILE_H264_BASELINE:
> +            avctx->profile = s->profile;
> +            avc.eProfile = OMX_VIDEO_AVCProfileBaseline;
> +            break;
> +        case FF_PROFILE_H264_MAIN:
> +            avctx->profile = s->profile;
> +            avc.eProfile = OMX_VIDEO_AVCProfileMain;
> +            break;
> +        case FF_PROFILE_H264_HIGH:
> +            avctx->profile = s->profile;
> +            avc.eProfile = OMX_VIDEO_AVCProfileHigh;
> +            break;
> +        }

Your switch/case no longer has a default. Is that intended? (Code
linters will complain.) AFAICT, avctx->profile will be unset if an
unknown s->profile is given. Is that okay? (It might be - I'm just
wondering. I *do* understand that not using the "profile" option will
default s->profile to FF_PROFILE_H264_HIGH.)

Moritz


More information about the ffmpeg-devel mailing list