summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/ad_hwac3.c4
-rw-r--r--libmpcodecs/ad_realaud.c7
-rw-r--r--libmpcodecs/dec_teletext.c3
-rw-r--r--libmpcodecs/dec_video.c4
-rw-r--r--libmpcodecs/vd_ffmpeg.c5
-rw-r--r--libmpcodecs/vd_realvid.c4
-rw-r--r--libmpcodecs/vd_sgi.c3
-rw-r--r--libmpcodecs/vf_filmdint.c2
-rw-r--r--libmpcodecs/vf_pp.c14
-rw-r--r--libmpcodecs/vf_scale.c4
-rw-r--r--libmpcodecs/vf_screenshot.c4
-rw-r--r--libmpcodecs/vf_smartblur.c5
-rw-r--r--libmpcodecs/vf_uspp.c4
-rw-r--r--libmpdemux/aac_hdr.c3
-rw-r--r--libmpdemux/asfheader.c2
-rw-r--r--libmpdemux/demux_asf.c6
-rw-r--r--libmpdemux/demux_avi.c2
-rw-r--r--libmpdemux/demux_film.c2
-rw-r--r--libmpdemux/demux_gif.c2
-rw-r--r--libmpdemux/demux_mov.c2
-rw-r--r--libmpdemux/demux_mpg.c7
-rw-r--r--libmpdemux/demux_ogg.c2
-rw-r--r--libmpdemux/demux_pva.c3
-rw-r--r--libmpdemux/demux_real.c12
-rw-r--r--libmpdemux/demux_roq.c3
-rw-r--r--libmpdemux/demux_smjpeg.c4
-rw-r--r--libmpdemux/demux_ts.c4
-rw-r--r--libmpdemux/demuxer.h2
-rw-r--r--libmpdemux/mpeg_hdr.c6
-rw-r--r--libmpdemux/yuv4mpeg.c3
-rw-r--r--libvo/vo_aa.c9
-rw-r--r--libvo/vo_matrixview.c2
-rw-r--r--libvo/vo_x11.c16
-rw-r--r--libvo/vo_xv.c4
-rw-r--r--m_option.c5
-rw-r--r--m_option.h6
-rw-r--r--mp_msg.c2
-rw-r--r--playtree.c3
-rw-r--r--stream/asf_mmst_streaming.c6
-rw-r--r--stream/dvb_tune.c2
-rw-r--r--stream/freesdp/parser.c8
-rw-r--r--stream/realrtsp/real.c3
-rw-r--r--stream/stream.c2
-rw-r--r--stream/stream_cdda.c6
-rw-r--r--stream/tv.c6
-rw-r--r--sub/font_load.c3
-rw-r--r--sub/font_load_ft.c12
-rw-r--r--sub/spudec.c2
-rw-r--r--sub/sub.c4
49 files changed, 107 insertions, 122 deletions
diff --git a/libmpcodecs/ad_hwac3.c b/libmpcodecs/ad_hwac3.c
index f45fd00a17..f5d6fbc933 100644
--- a/libmpcodecs/ad_hwac3.c
+++ b/libmpcodecs/ad_hwac3.c
@@ -283,9 +283,9 @@ static int dts_decode_header(uint8_t *indata_ptr, int *rate, int *nblks, int *sf
{
int ftype;
int surp;
- int unknown_bit;
+ int unknown_bit av_unused;
int fsize;
- int amode;
+ int amode av_unused;
int word_mode;
int le_mode;
diff --git a/libmpcodecs/ad_realaud.c b/libmpcodecs/ad_realaud.c
index 0b7fb219f7..3f221c61ef 100644
--- a/libmpcodecs/ad_realaud.c
+++ b/libmpcodecs/ad_realaud.c
@@ -27,7 +27,7 @@
#include <dlfcn.h>
#endif
#include "path.h"
-
+#include "libavutil/attributes.h"
#include "ad_internal.h"
#include "loader/wine/windef.h"
@@ -41,6 +41,9 @@ static const ad_info_t info = {
LIBAD_EXTERN(realaud)
+void *__builtin_new(unsigned long size);
+void __builtin_delete(void *ize);
+
void *__builtin_new(unsigned long size) {
return malloc(size);
}
@@ -414,7 +417,7 @@ static void uninit(sh_audio_t *sh){
}
static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen){
- int result;
+ int result av_unused;
int len=-1;
if(sh->a_in_buffer_len<=0){
diff --git a/libmpcodecs/dec_teletext.c b/libmpcodecs/dec_teletext.c
index d619ecde80..4ae94ec0d1 100644
--- a/libmpcodecs/dec_teletext.c
+++ b/libmpcodecs/dec_teletext.c
@@ -1638,7 +1638,7 @@ static int teletext_set_format(priv_vbi_t * priv, teletext_format flag)
*/
static void vbi_add_dec(priv_vbi_t * priv, char *dec)
{
- int count, shift;
+ int count;
if (!dec)
return;
if (!priv->on)
@@ -1657,7 +1657,6 @@ static void vbi_add_dec(priv_vbi_t * priv, char *dec)
else
priv->pagenumdec=0;
} else {
- shift = count * 4;
count++;
priv->pagenumdec=
(((priv->pagenumdec)<<4|(*dec-'0'))&0xfff)|(count<<12);
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index 71d6de5216..f49eb79218 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -109,7 +109,7 @@ int set_video_colors(sh_video_t *sh_video, const char *item, int value)
/* try software control */
const struct vd_functions *vd = sh_video->vd_driver;
if (vd &&
- vd->control(sh_video, VDCTRL_SET_EQUALIZER, item, (int *) value)
+ vd->control(sh_video, VDCTRL_SET_EQUALIZER, (void *)item, value)
== CONTROL_OK)
return 1;
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Video attribute '%s' is not supported by selected vo & vd.\n",
@@ -135,7 +135,7 @@ int get_video_colors(sh_video_t *sh_video, const char *item, int *value)
/* try software control */
const struct vd_functions *vd = sh_video->vd_driver;
if (vd)
- return vd->control(sh_video, VDCTRL_GET_EQUALIZER, item, value);
+ return vd->control(sh_video, VDCTRL_GET_EQUALIZER, (void *)item, value);
return 0;
}
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 598be093c1..a5c21a2e62 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -796,9 +796,10 @@ static struct mp_image *decode(struct sh_video *sh, void *data, int len,
// HACK: make PNGs decode normally instead of as CorePNG delta frames
pkt.flags = AV_PKT_FLAG_KEY;
// The avcodec opaque field stupidly supports only int64_t type
- *(double *)&avctx->reordered_opaque = *reordered_pts;
+ union pts { int64_t i; double d; };
+ avctx->reordered_opaque = (union pts){.d = *reordered_pts}.i;
ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt);
- *reordered_pts = *(double *)&pic->reordered_opaque;
+ *reordered_pts = (union pts){.i = pic->reordered_opaque}.d;
dr1= ctx->do_dr1;
if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n");
diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c
index 17250fe8ca..8fc843855f 100644
--- a/libmpcodecs/vd_realvid.c
+++ b/libmpcodecs/vd_realvid.c
@@ -84,6 +84,10 @@ static int bufsz = 0;
static int dll_type = 0; /* 0 = unix dlopen, 1 = win32 dll */
#endif
+void *__builtin_vec_new(unsigned long size);
+void __builtin_vec_delete(void *mem);
+void __pure_virtual(void);
+
void *__builtin_vec_new(unsigned long size) {
return malloc(size);
}
diff --git a/libmpcodecs/vd_sgi.c b/libmpcodecs/vd_sgi.c
index fff6d6f60b..e7dd90cecc 100644
--- a/libmpcodecs/vd_sgi.c
+++ b/libmpcodecs/vd_sgi.c
@@ -173,10 +173,9 @@ decode_rle_sgi(SGIInfo *info, unsigned char *data, mp_image_t *mpi)
{
unsigned char *rle_data, *dest_row;
uint32_t *starttab;
- int y, z, xsize, ysize, zsize, chan_offset;
+ int y, z, ysize, zsize, chan_offset;
long start_offset;
- xsize = info->xsize;
ysize = info->ysize;
zsize = info->zsize;
diff --git a/libmpcodecs/vf_filmdint.c b/libmpcodecs/vf_filmdint.c
index b40a66831a..9c34b4aa07 100644
--- a/libmpcodecs/vf_filmdint.c
+++ b/libmpcodecs/vf_filmdint.c
@@ -1139,7 +1139,7 @@ find_breaks(struct vf_priv_s *p, struct frame_stats *s)
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
{
- mp_image_t *dmpi;
+ mp_image_t *dmpi = NULL;
struct vf_priv_s *p = vf->priv;
unsigned char **planes, **old_planes;
struct frame_stats *s = &p->stats[p->inframes & 1];
diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c
index 10c4edf707..694fa09bf2 100644
--- a/libmpcodecs/vf_pp.c
+++ b/libmpcodecs/vf_pp.c
@@ -133,7 +133,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
if(vf->priv->pp || !(mpi->flags&MP_IMGFLAG_DIRECT)){
// do the postprocessing! (or copy if no DR)
- pp_postprocess(mpi->planes ,mpi->stride,
+ pp_postprocess((const uint8_t **)mpi->planes, mpi->stride,
vf->dmpi->planes,vf->dmpi->stride,
(mpi->w+7)&(~7),mpi->h,
mpi->qscale, mpi->qstride,
@@ -162,9 +162,7 @@ static const unsigned int fmt_list[]={
};
static int vf_open(vf_instance_t *vf, char *args){
- char *endptr, *name;
int i;
- int hex_mode=0;
vf->query_format=query_format;
vf->control=control;
@@ -180,15 +178,7 @@ static int vf_open(vf_instance_t *vf, char *args){
vf->priv->outfmt=vf_match_csp(&vf->next,fmt_list,IMGFMT_YV12);
if(!vf->priv->outfmt) return 0; // no csp match :(
- if(args){
- hex_mode= strtol(args, &endptr, 0);
- if(*endptr){
- name= args;
- }else
- name= NULL;
- }else{
- name="de";
- }
+ char *name = args ? args : "de";
for(i=0; i<=PP_QUALITY_MAX; i++){
vf->priv->ppMode[i]= pp_get_mode_by_name_and_quality(name, i);
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index 12c51ae685..e8e846c92f 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -377,7 +377,7 @@ static void start_slice(struct vf_instance *vf, mp_image_t *mpi){
static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src[MP_MAX_PLANES], int src_stride[MP_MAX_PLANES],
int y, int h, uint8_t *dst[MP_MAX_PLANES], int dst_stride[MP_MAX_PLANES], int interlaced){
- uint8_t *src2[MP_MAX_PLANES]={src[0], src[1], src[2], src[3]};
+ const uint8_t *src2[MP_MAX_PLANES]={src[0], src[1], src[2], src[3]};
#if HAVE_BIGENDIAN
uint32_t pal2[256];
if (src[1] && !src[2]){
@@ -671,7 +671,7 @@ static const m_option_t vf_opts_fields[] = {
{"param2", ST_OFF(param[1]), CONF_TYPE_DOUBLE, M_OPT_RANGE, 0.0, 100.0, NULL},
// Note that here the 2 field is NULL (ie 0)
// As we want this option to act on the option struct itself
- {"presize", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0, &size_preset},
+ {"presize", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0, (void *)&size_preset},
{"noup", ST_OFF(noup), CONF_TYPE_INT, M_OPT_RANGE, 0, 2, NULL},
{"arnd", ST_OFF(accurate_rnd), CONF_TYPE_FLAG, 0, 0, 1, NULL},
{ NULL, NULL, 0, 0, 0, 0, NULL }
diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c
index 82b345b446..1b5d575fba 100644
--- a/libmpcodecs/vf_screenshot.c
+++ b/libmpcodecs/vf_screenshot.c
@@ -134,7 +134,7 @@ static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi)
priv->buffer = av_malloc(dst_stride[0]*priv->dh);
dst[0] = priv->buffer;
- sws_scale(priv->ctx, mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride);
+ sws_scale(priv->ctx, (const uint8_t **)mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride);
}
static void start_slice(struct vf_instance *vf, mp_image_t *mpi)
@@ -157,7 +157,7 @@ static void draw_slice(struct vf_instance *vf, unsigned char** src,
int dst_stride[MP_MAX_PLANES] = {0};
dst_stride[0] = vf->priv->stride;
dst[0] = vf->priv->buffer;
- sws_scale(vf->priv->ctx, src, stride, y, h, dst, dst_stride);
+ sws_scale(vf->priv->ctx, (const uint8_t **)src, stride, y, h, dst, dst_stride);
}
vf_next_draw_slice(vf,src,stride,w,h,x,y);
}
diff --git a/libmpcodecs/vf_smartblur.c b/libmpcodecs/vf_smartblur.c
index 4083dfbda0..6599c967de 100644
--- a/libmpcodecs/vf_smartblur.c
+++ b/libmpcodecs/vf_smartblur.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <inttypes.h>
#include <assert.h>
+#include <stdbool.h>
#include "mp_msg.h"
#include "libavutil/avutil.h"
@@ -156,11 +157,11 @@ static inline void blur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride,
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
int cw= mpi->w >> mpi->chroma_x_shift;
int ch= mpi->h >> mpi->chroma_y_shift;
- FilterParam *f= &vf->priv;
+ bool threshold = vf->priv->luma.threshold || vf->priv->chroma.threshold;
mp_image_t *dmpi=vf_get_image(vf->next,mpi->imgfmt,
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE|
- (f->threshold) ? MP_IMGFLAG_READABLE : 0,
+ (threshold ? MP_IMGFLAG_READABLE : 0),
mpi->w,mpi->h);
assert(mpi->flags&MP_IMGFLAG_PLANAR);
diff --git a/libmpcodecs/vf_uspp.c b/libmpcodecs/vf_uspp.c
index 6feb8eb468..85383716b5 100644
--- a/libmpcodecs/vf_uspp.c
+++ b/libmpcodecs/vf_uspp.c
@@ -175,12 +175,12 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds
for(i=0; i<count; i++){
const int x1= offset[i+count-1][0];
const int y1= offset[i+count-1][1];
- int offset, out_size;
+ int offset;
p->frame->data[0]= p->src[0] + x1 + y1 * p->frame->linesize[0];
p->frame->data[1]= p->src[1] + x1/2 + y1/2 * p->frame->linesize[1];
p->frame->data[2]= p->src[2] + x1/2 + y1/2 * p->frame->linesize[2];
- out_size = avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame);
+ avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame);
p->frame_dec = p->avctx_enc[i]->coded_frame;
offset= (BLOCK-x1) + (BLOCK-y1)*p->frame_dec->linesize[0];
diff --git a/libmpdemux/aac_hdr.c b/libmpdemux/aac_hdr.c
index aed06f0e28..36991e27a2 100644
--- a/libmpdemux/aac_hdr.c
+++ b/libmpdemux/aac_hdr.c
@@ -20,6 +20,7 @@
#include <stdint.h>
#include "aac_hdr.h"
+#include "libavutil/attributes.h"
/// \param srate (out) sample rate
/// \param num (out) number of audio frames in this ADTS frame
@@ -27,7 +28,7 @@
/// aac_parse_frames needs a buffer at least 8 bytes long
int aac_parse_frame(uint8_t *buf, int *srate, int *num)
{
- int i = 0, sr, fl = 0, id;
+ int i = 0, sr, fl = 0, id av_unused;
static int srates[] = {96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 0, 0, 0};
if((buf[i] != 0xFF) || ((buf[i+1] & 0xF6) != 0xF0))
diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c
index 7a2285e2a1..994c3e890d 100644
--- a/libmpdemux/asfheader.c
+++ b/libmpdemux/asfheader.c
@@ -139,7 +139,7 @@ static int get_ext_stream_properties(char *buf, int buf_len, int stream_num, str
{
int pos=0;
uint8_t *buffer = &buf[0];
- uint64_t avg_ft;
+ uint64_t avg_ft av_unused;
unsigned bitrate;
while ((pos = find_asf_guid(buf, asf_ext_stream_header, pos, buf_len)) >= 0) {
diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c
index aef2f5ece0..5c79774da7 100644
--- a/libmpdemux/demux_asf.c
+++ b/libmpdemux/demux_asf.c
@@ -200,7 +200,7 @@ static int demux_asf_read_packet(demuxer_t *demux,unsigned char *data,int len,in
*/
static void get_payload_extension_data(demuxer_t *demux, unsigned char** pp, unsigned char id, unsigned int seq, int *keyframe, uint64_t *seg_time){
struct asf_priv* asf = demux->priv;
- uint64_t payload_time; //100ns units
+ uint64_t payload_time = -1; //100ns units
int i, ext_max, ext_timing_index;
uint8_t *pi = *pp+4;
@@ -362,8 +362,8 @@ static int demux_asf_fill_buffer(demuxer_t *demux, demux_stream_t *ds){
unsigned char segtype=p[1];
unsigned padding;
unsigned plen;
- unsigned sequence;
- unsigned long time=0;
+ unsigned sequence av_unused;
+ unsigned long time av_unused = 0;
unsigned short duration=0;
int segs=1;
diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c
index 904f6b8675..f73648166c 100644
--- a/libmpdemux/demux_avi.c
+++ b/libmpdemux/demux_avi.c
@@ -808,7 +808,7 @@ static int demux_avi_control(demuxer_t *demuxer,int cmd, void *arg){
case DEMUXER_CTRL_SWITCH_VIDEO: {
int audio = (cmd == DEMUXER_CTRL_SWITCH_AUDIO);
demux_stream_t *ds = audio ? demuxer->audio : demuxer->video;
- void **streams = audio ? demuxer->a_streams : demuxer->v_streams;
+ void **streams = audio ? (void **)demuxer->a_streams : (void **)demuxer->v_streams;
int maxid = FFMIN(100, audio ? MAX_A_STREAMS : MAX_V_STREAMS);
int chunkid;
if (ds->id < -1)
diff --git a/libmpdemux/demux_film.c b/libmpdemux/demux_film.c
index c720e85887..8575d5f1e8 100644
--- a/libmpdemux/demux_film.c
+++ b/libmpdemux/demux_film.c
@@ -158,7 +158,7 @@ static int demux_film_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
memcpy( tmp, buf, film_chunk.chunk_size );
}
else {/* for 16bit */
- unsigned short* tmp = dp->buffer;
+ unsigned short *tmp = (unsigned short *)dp->buffer;
unsigned short buf[film_chunk.chunk_size/2];
for(i = 0; i < film_chunk.chunk_size/4; i++) {
buf[i*2] = tmp[i];
diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c
index ce7a3d1252..eee7a856dc 100644
--- a/libmpdemux/demux_gif.c
+++ b/libmpdemux/demux_gif.c
@@ -89,7 +89,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
uint8_t *buf = NULL;
int refmode = 0;
int transparency = 0;
- uint8_t transparent_col;
+ uint8_t transparent_col = 0;
while (type != IMAGE_DESC_RECORD_TYPE) {
if (DGifGetRecordType(gif, &type) == GIF_ERROR) {
diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c
index 5ecb076698..521b499ff6 100644
--- a/libmpdemux/demux_mov.c
+++ b/libmpdemux/demux_mov.c
@@ -622,7 +622,7 @@ static int gen_sh_audio(sh_audio_t* sh, mov_track_t* trak, int timescale) {
// ([int32_t size,int32_t type,some data ],repeat)
} my_stdata;
#endif
- int version, adjust;
+ int version = -1, adjust;
int is_vorbis = 0;
sh->format=trak->fourcc;
diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c
index cc798a0430..93ee4106aa 100644
--- a/libmpdemux/demux_mpg.c
+++ b/libmpdemux/demux_mpg.c
@@ -28,6 +28,7 @@
#include "mp_msg.h"
#include "options.h"
+#include "libavutil/attributes.h"
#include "libmpcodecs/dec_audio.h"
#include "stream/stream.h"
#include "demuxer.h"
@@ -286,12 +287,12 @@ static void new_audio_stream(demuxer_t *demux, int aid){
}
static int demux_mpg_read_packet(demuxer_t *demux,int id){
- int d;
+ int d av_unused;
int len;
int set_pts=0; // !=0 iff pts has been set to a proper value
unsigned char c=0;
unsigned long long pts=0;
- unsigned long long dts=0;
+ unsigned long long dts av_unused = 0;
int l;
int pes_ext2_subid=-1;
double stream_pts = MP_NOPTS_VALUE;
@@ -671,7 +672,7 @@ static inline void update_stats(int head)
}
static int demux_mpg_probe(demuxer_t *demuxer) {
- int pes=1;
+ int pes av_unused = 1;
int tmp;
off_t tmppos;
int file_format = DEMUXER_TYPE_UNKNOWN;
diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c
index 08ed883d7b..18da80f72a 100644
--- a/libmpdemux/demux_ogg.c
+++ b/libmpdemux/demux_ogg.c
@@ -411,7 +411,7 @@ static void demux_ogg_check_comments(demuxer_t *d, ogg_stream_t *os,
};
while (*cmt) {
- hdr = NULL;
+ hdr = val = NULL;
if (!strncasecmp(*cmt, "LANGUAGE=", 9)) {
val = *cmt + 9;
if (ogg_d->subs[id].text)
diff --git a/libmpdemux/demux_pva.c b/libmpdemux/demux_pva.c
index dc25d29662..883641fbc8 100644
--- a/libmpdemux/demux_pva.c
+++ b/libmpdemux/demux_pva.c
@@ -198,7 +198,7 @@ static int pva_get_payload(demuxer_t *d, pva_payload_t *payload)
{
uint8_t flags,pes_head_len;
uint16_t pack_size;
- off_t next_offset,pva_payload_start;
+ off_t pva_payload_start;
unsigned char buffer[256];
#ifndef PVA_NEW_PREBYTES_CODE
demux_packet_t * dp; //hack to deliver the preBytes (see PVA doc)
@@ -273,7 +273,6 @@ static int pva_get_payload(demuxer_t *d, pva_payload_t *payload)
pack_size=stream_read_word(d->stream);
mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_pva::pva_get_payload(): pack_size=%u field read at offset %"PRIu64"\n",pack_size,(int64_t)stream_tell(d->stream)-2);
pva_payload_start=stream_tell(d->stream);
- next_offset=pva_payload_start+pack_size;
/*
diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c
index 1bdf8ec19b..b392df817c 100644
--- a/libmpdemux/demux_real.c
+++ b/libmpdemux/demux_real.c
@@ -577,7 +577,7 @@ static int demux_real_fill_buffer(demuxer_t *demuxer, demux_stream_t *dsds)
#endif
int flags;
int version;
- int reserved;
+ int reserved av_unused;
demux_packet_t *dp;
int x, sps, cfs, sph, spc, w;
int audioreorder_getnextpk = 0;
@@ -892,7 +892,7 @@ got_video:
if (0x40==(vpkg_header&0xc0)) {
// seems to be a very short header
// 2 bytes, purpose of the second byte yet unknown
- int bummer;
+ int bummer av_unused;
bummer=stream_read_char(demuxer->stream); --len;
mp_dbg(MSGT_DEMUX,MSGL_DBG2, "%02X",bummer);
vpkg_offset=0;
@@ -1267,7 +1267,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
int sub_packet_size;
int sub_packet_h;
int version;
- int flavor;
+ int flavor av_unused;
int coded_frame_size;
int codecdata_length;
int i;
@@ -1321,6 +1321,8 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
sh->samplesize = 16;
sh->samplerate = 8000;
frame_size = 240;
+ sub_packet_h = 0;
+ sub_packet_size = coded_frame_size = 0x14;
strcpy(buf, "14_4");
} else {
stream_skip(demuxer->stream, 2); // 00 00
@@ -1387,7 +1389,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
// sh->format = 0x2000;
break;
case MKTAG('1', '4', '_', '4'):
- sh->wf->nBlockAlign = 0x14;
+ sh->wf->nBlockAlign = coded_frame_size;
break;
case MKTAG('2', '8', '_', '8'):
@@ -1686,7 +1688,7 @@ header_end:
} else {
priv->audio_curpos = priv->str_data_offset[demuxer->audio->id] + 18;
stream_seek(demuxer->stream, priv->str_data_offset[demuxer->audio->id]+10);
- priv->a_num_of_packets=priv->a_num_of_packets = stream_read_dword(demuxer->stream);
+ priv->a_num_of_packets = stream_read_dword(demuxer->stream);
priv->video_curpos = priv->str_data_offset[demuxer->video->id] + 18;
stream_seek(demuxer->stream, priv->str_data_offset[demuxer->video->id]+10);
priv->v_num_of_packets = stream_read_dword(demuxer->stream);
diff --git a/libmpdemux/demux_roq.c b/libmpdemux/demux_roq.c
index aafcd29468..af9e4c5a8e 100644
--- a/libmpdemux/demux_roq.c
+++ b/libmpdemux/demux_roq.c
@@ -31,6 +31,7 @@
#include "stream/stream.h"
#include "demuxer.h"
#include "stheader.h"
+#include "libavutil/attributes.h"
#define RoQ_INFO 0x1001
#define RoQ_QUAD_CODEBOOK 0x1002
@@ -110,7 +111,7 @@ static demuxer_t* demux_open_roq(demuxer_t* demuxer)
roq_data_t *roq_data = malloc(sizeof(roq_data_t));
int chunk_id;
int chunk_size;
- int chunk_arg;
+ int chunk_arg av_unused;
int last_chunk_id = 0;
int largest_audio_chunk = 0;
int fps;
diff --git a/libmpdemux/demux_smjpeg.c b/libmpdemux/demux_smjpeg.c
index 8933e8c8f5..8dabc8a0e2 100644
--- a/libmpdemux/demux_smjpeg.c
+++ b/libmpdemux/demux_smjpeg.c
@@ -28,7 +28,7 @@
#include "config.h"
#include "mp_msg.h"
-
+#include "libavutil/attributes.h"
#include "stream/stream.h"
#include "demuxer.h"
#include "stheader.h"
@@ -103,7 +103,7 @@ static int demux_smjpeg_fill_buffer(demuxer_t *demux, demux_stream_t *ds)
static demuxer_t* demux_open_smjpeg(demuxer_t* demuxer){
sh_video_t* sh_video;
sh_audio_t* sh_audio;
- unsigned int htype = 0, hleng;
+ unsigned int htype = 0, hleng av_unused;
int i = 0;
/* file header */
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c
index dbb9f3ef55..ebb1709f5a 100644
--- a/libmpdemux/demux_ts.c
+++ b/libmpdemux/demux_ts.c
@@ -661,7 +661,7 @@ static int a52_check(char *buf, int len)
static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
{
- int video_found = 0, audio_found = 0, sub_found = 0, i, num_packets = 0, req_apid, req_v