aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-30 20:47:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-30 20:47:54 +0200
commit081f4f5f56e0f6220039e39b9be2c2a2021dd40c (patch)
treeaeb240725399c0183fdad326aa245697422e9162 /libavcodec
parentf953c3c2343dc78c45a001aa38ecb20cee447df7 (diff)
parente4fb53c73abece15a7c5df0019df9a0371db2297 (diff)
downloadffmpeg-081f4f5f56e0f6220039e39b9be2c2a2021dd40c.tar.gz
Merge commit 'e4fb53c73abece15a7c5df0019df9a0371db2297' into release/1.1
* commit 'e4fb53c73abece15a7c5df0019df9a0371db2297': ffv1dec: check that global parameters do not change in version 0/1 Conflicts: libavcodec/ffv1dec.c See: f78a3868fd3d8f66da68338c0783aa15f98833bf Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1dec.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index a3afa14845..1aaa0e29af 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -541,31 +541,31 @@ static int read_header(FFV1Context *f)
f->state_transition[i] = get_symbol(c, state, 1) + c->one_state[i];
}
- colorspace = get_symbol(c, state, 0); //YUV cs type
+ colorspace = get_symbol(c, state, 0); //YUV cs type
bits_per_raw_sample = f->version > 0 ? get_symbol(c, state, 0) : f->avctx->bits_per_raw_sample;
- chroma_planes = get_rac(c, state);
- chroma_h_shift = get_symbol(c, state, 0);
- chroma_v_shift = get_symbol(c, state, 0);
- transparency = get_rac(c, state);
+ chroma_planes = get_rac(c, state);
+ chroma_h_shift = get_symbol(c, state, 0);
+ chroma_v_shift = get_symbol(c, state, 0);
+ transparency = get_rac(c, state);
if (f->plane_count) {
- if ( colorspace != f->colorspace
- || bits_per_raw_sample != f->avctx->bits_per_raw_sample
- || chroma_planes != f->chroma_planes
- || chroma_h_shift!= f->chroma_h_shift
- || chroma_v_shift!= f->chroma_v_shift
- || transparency != f->transparency) {
+ if (colorspace != f->colorspace ||
+ bits_per_raw_sample != f->avctx->bits_per_raw_sample ||
+ chroma_planes != f->chroma_planes ||
+ chroma_h_shift != f->chroma_h_shift ||
+ chroma_v_shift != f->chroma_v_shift ||
+ transparency != f->transparency) {
av_log(f->avctx, AV_LOG_ERROR, "Invalid change of global parameters\n");
return AVERROR_INVALIDDATA;
}
}
- f->colorspace = colorspace;
+ f->colorspace = colorspace;
f->avctx->bits_per_raw_sample = bits_per_raw_sample;
- f->chroma_planes = chroma_planes;
- f->chroma_h_shift = chroma_h_shift;
- f->chroma_v_shift = chroma_v_shift;
- f->transparency = transparency;
+ f->chroma_planes = chroma_planes;
+ f->chroma_h_shift = chroma_h_shift;
+ f->chroma_v_shift = chroma_v_shift;
+ f->transparency = transparency;
f->plane_count = 2 + f->transparency;
}