Rick Kern <kernrj <at> gmail.com> writes:

> +    if(!*refPtr) return;

Is this needed (I don't know)?
If yes, please make it two lines.

> +    CFRelease(*refPtr);
> +    *refPtr = NULL;
> +    switch (fmt) {
> +        case AV_PIX_FMT_NV12:
> +            switch (range) {
> +                case AVCOL_RANGE_MPEG:
> +                    *av_pixel_format = 
> kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
> +                    break;
> +
> +                case AVCOL_RANGE_JPEG:
> +                    *av_pixel_format = 
> kCVPixelFormatType_420YpCbCr8BiPlanarFullRange;
> +                    break;
> +
> +                default:
> +                    if (range_guessed) *range_guessed = 1;
> +                    *av_pixel_format = 
> kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;

You can rearrange this to make the patch smaller (and 
the default case easier to read).
Same below.

>  static const enum AVPixelFormat pix_fmts[] = {
>      AV_PIX_FMT_NV12,
> -#if !TARGET_OS_IPHONE
>      AV_PIX_FMT_YUV420P,
> -#endif
>      AV_PIX_FMT_NONE

Sorry: How is this related?

Carl Eugen

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to