summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c4
-rw-r--r--libavcodec/sipr.c5
-rw-r--r--libavcodec/sipr.h1
3 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index ca7867e11c..b22d5e2938 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1014,7 +1014,7 @@ int ff_h264_decode_extradata(H264Context *h)
{
AVCodecContext *avctx = h->s.avctx;
- if(*(char *)avctx->extradata == 1){
+ if(avctx->extradata[0] == 1){
int i, cnt, nalsize;
unsigned char *p = avctx->extradata;
@@ -1049,7 +1049,7 @@ int ff_h264_decode_extradata(H264Context *h)
p += nalsize;
}
// Now store right nal length size, that will be use to parse all other nals
- h->nal_length_size = ((*(((char*)(avctx->extradata))+4))&0x03)+1;
+ h->nal_length_size = (avctx->extradata[4] & 0x03) + 1;
} else {
h->is_avc = 0;
if(decode_nal_units(h, avctx->extradata, avctx->extradata_size) < 0)
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
index b96e3b9024..9befe8a158 100644
--- a/libavcodec/sipr.c
+++ b/libavcodec/sipr.c
@@ -23,6 +23,7 @@
#include <math.h>
#include <stdint.h>
+#include <string.h>
#include "libavutil/mathematics.h"
#include "avcodec.h"
@@ -461,7 +462,7 @@ static void decode_frame(SiprContext *ctx, SiprParameters *params,
memcpy(ctx->postfilter_syn5k0, ctx->postfilter_syn5k0 + frame_size,
LP_FILTER_ORDER*sizeof(float));
}
- memcpy(ctx->excitation, excitation - PITCH_DELAY_MAX - L_INTERPOL,
+ memmove(ctx->excitation, excitation - PITCH_DELAY_MAX - L_INTERPOL,
(PITCH_DELAY_MAX + L_INTERPOL) * sizeof(float));
ff_acelp_apply_order_2_transfer_function(out_data, synth,
@@ -495,8 +496,6 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx)
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
- dsputil_init(&ctx->dsp, avctx);
-
return 0;
}
diff --git a/libavcodec/sipr.h b/libavcodec/sipr.h
index 66e7696466..3bb0b37016 100644
--- a/libavcodec/sipr.h
+++ b/libavcodec/sipr.h
@@ -55,7 +55,6 @@ typedef enum {
typedef struct {
AVCodecContext *avctx;
- DSPContext dsp;
SiprMode mode;