diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-09-01 02:01:54 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2011-09-01 20:23:40 +0200 |
commit | f067d8a6186a3c2de43400295ac2978170e5b19d (patch) | |
tree | da011a24bcf244106a564add48e16fcef409868f | |
parent | c0e8bce349f9b76d0f1b2fc6ae1f63ebed01433b (diff) | |
download | ffmpeg-f067d8a6186a3c2de43400295ac2978170e5b19d.tar.gz |
imgconvert: avoid mixed declarations and code.
-rw-r--r-- | libavcodec/imgconvert.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 66ce9de339..13c2cde53d 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -359,15 +359,17 @@ static int get_pix_fmt_depth(int *min, int *max, enum PixelFormat pix_fmt) int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt, int has_alpha) { - if (dst_pix_fmt>=PIX_FMT_NB || dst_pix_fmt<=PIX_FMT_NONE) - return ~0; - const PixFmtInfo *pf, *ps; - const AVPixFmtDescriptor *src_desc = &av_pix_fmt_descriptors[src_pix_fmt]; - const AVPixFmtDescriptor *dst_desc = &av_pix_fmt_descriptors[dst_pix_fmt]; + const AVPixFmtDescriptor *src_desc; + const AVPixFmtDescriptor *dst_desc; int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth; int ret, loss; + if (dst_pix_fmt >= PIX_FMT_NB || dst_pix_fmt <= PIX_FMT_NONE) + return ~0; + + src_desc = &av_pix_fmt_descriptors[src_pix_fmt]; + dst_desc = &av_pix_fmt_descriptors[dst_pix_fmt]; ps = &pix_fmt_info[src_pix_fmt]; /* compute loss */ |