summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-12 16:15:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-12 16:15:08 +0100
commit7787a6c7caa0a3bdca3b479286def754e6f56cf0 (patch)
tree0a77c8060fd87f6e2a6d0cae72907bcf9d2e5742
parent6ec0447d3d220bc113a69fac04f8b2a423342479 (diff)
parentcacad1c058f66558ec727faac3b277d2dee264d4 (diff)
Merge commit 'cacad1c058f66558ec727faac3b277d2dee264d4'
* commit 'cacad1c058f66558ec727faac3b277d2dee264d4': wmaprodec: require block_align to be set. wmadec: require block_align to be set. ivi_common: do not call MC for intra frames when dc_transform is unset Conflicts: libavcodec/ivi_common.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/ivi_common.c4
-rw-r--r--libavcodec/wmadec.c5
-rw-r--r--libavcodec/wmaprodec.c5
3 files changed, 12 insertions, 2 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index a3dfc0e57b..8dd89400b5 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -538,8 +538,8 @@ static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile
/* for intra blocks apply the dc slant transform */
/* for inter - perform the motion compensation without delta */
if (is_intra) {
- band->dc_transform(&prev_dc, band->buf + buf_offs,
- band->pitch, blk_size);
+ band->dc_transform(&prev_dc, band->buf + buf_offs,
+ band->pitch, blk_size);
} else
mc_no_delta_func(band->buf + buf_offs,
band->ref_buf + buf_offs + mv_y * band->pitch + mv_x,
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 2774dc9877..ae1a983ad8 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -72,6 +72,11 @@ static int wma_decode_init(AVCodecContext * avctx)
int i, flags2;
uint8_t *extradata;
+ if (!avctx->block_align) {
+ av_log(avctx, AV_LOG_ERROR, "block_align is not set\n");
+ return AVERROR(EINVAL);
+ }
+
s->avctx = avctx;
/* extract flag infos */
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 08c1561894..afe4661c6b 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -277,6 +277,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
int log2_max_num_subframes;
int num_possible_block_sizes;
+ if (!avctx->block_align) {
+ av_log(avctx, AV_LOG_ERROR, "block_align is not set\n");
+ return AVERROR(EINVAL);
+ }
+
s->avctx = avctx;
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);