summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-05 00:44:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-05 00:54:28 +0200
commitbce42e95d13e3cc9c32bcd75d127c0152e51471d (patch)
treeec7e1e19748ce5ee666d2f89aa0fc306d8f462e5 /libavcodec
parentb18c9f1eb024abd239c16636f1ef3a9a02d6f262 (diff)
parent313f9fbfbb5a45eefe4bfe7b04e6c83f9b5f77c7 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: configure: add POWER[5-7] support arm: intreadwrite: revert 16-bit load asm to old version for gcc < 4.6 vqavideo: return error if image size is not a multiple of block size cosmetics: indentation avformat: only fill-in interpolated timestamps if duration is non-zero avformat: remove a workaround for broken timestamps Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vqavideo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index dcd81c73c5..6874b75201 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -155,6 +155,11 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
return -1;
}
+ if (s->width % s->vector_width || s->height % s->vector_height) {
+ av_log(avctx, AV_LOG_ERROR, "Image size not multiple of block size\n");
+ return AVERROR_INVALIDDATA;
+ }
+
/* allocate codebooks */
s->codebook_size = MAX_CODEBOOK_SIZE;
s->codebook = av_malloc(s->codebook_size);
@@ -164,11 +169,6 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
if (!s->next_codebook_buffer)
goto fail;
- if (s->width % s->vector_width || s->height % s->vector_height) {
- av_log(avctx, AV_LOG_ERROR, "Picture dimensions are not a multiple of the vector size\n");
- goto fail;
- }
-
/* allocate decode buffer */
s->decode_buffer_size = (s->width / s->vector_width) *
(s->height / s->vector_height) * 2;