This avoids warnings about set-but-unused variables.
---
ffplay.c | 4 ++--
libavcodec/fft-test.c | 5 +++--
libavcodec/mpeg4videoenc.c | 8 +++++---
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index d66249b..830346d 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1312,9 +1312,10 @@ static void alloc_picture(void *opaque)
static int queue_picture(VideoState *is, AVFrame *src_frame, double pts,
int64_t pos)
{
VideoPicture *vp;
- int dst_pix_fmt;
#if CONFIG_AVFILTER
AVPicture pict_src;
+#else
+ int dst_pix_fmt = PIX_FMT_YUV420P;
#endif
/* wait until we have space to put a new picture */
SDL_LockMutex(is->pictq_mutex);
@@ -1375,7 +1376,6 @@ static int queue_picture(VideoState *is, AVFrame
*src_frame, double pts, int64_t
/* get a pointer on the bitmap */
SDL_LockYUVOverlay (vp->bmp);
- dst_pix_fmt = PIX_FMT_YUV420P;
pict.data[0] = vp->bmp->pixels[0];
pict.data[1] = vp->bmp->pixels[2];
pict.data[2] = vp->bmp->pixels[1];
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index 0112c6f..59a53dd 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -252,8 +252,9 @@ int main(int argc, char **argv)
#if CONFIG_FFT_FLOAT
RDFTContext r1, *r = &r1;
DCTContext d1, *d = &d1;
+ int fft_size_2;
#endif
- int fft_nbits, fft_size, fft_size_2;
+ int fft_nbits, fft_size;
double scale = 1.0;
AVLFG prng;
av_lfg_init(&prng, 1);
@@ -292,7 +293,6 @@ int main(int argc, char **argv)
}
fft_size = 1 << fft_nbits;
- fft_size_2 = fft_size >> 1;
tab = av_malloc(fft_size * sizeof(FFTComplex));
tab1 = av_malloc(fft_size * sizeof(FFTComplex));
tab_ref = av_malloc(fft_size * sizeof(FFTComplex));
@@ -372,6 +372,7 @@ int main(int argc, char **argv)
break;
#if CONFIG_FFT_FLOAT
case TRANSFORM_RDFT:
+ fft_size_2 = fft_size >> 1;
if (do_inverse) {
tab1[ 0].im = 0;
tab1[fft_size_2].im = 0;
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 8a9bd19..9e99d31 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -298,8 +298,8 @@ static inline void mpeg4_encode_block(MpegEncContext * s,
DCTELEM * block, int n
int i, last_non_zero;
#if 0 //variables for the outcommented version
int code, sign, last;
-#endif
const RLTable *rl;
+#endif
uint32_t *bits_tab;
uint8_t *len_tab;
const int last_index = s->block_last_index[n];
@@ -309,13 +309,11 @@ static inline void mpeg4_encode_block(MpegEncContext * s,
DCTELEM * block, int n
mpeg4_encode_dc(dc_pb, intra_dc, n);
if(last_index<1) return;
i = 1;
- rl = &ff_mpeg4_rl_intra;
bits_tab= uni_mpeg4_intra_rl_bits;
len_tab = uni_mpeg4_intra_rl_len;
} else {
if(last_index<0) return;
i = 0;
- rl = &ff_h263_rl_inter;
bits_tab= uni_mpeg4_inter_rl_bits;
len_tab = uni_mpeg4_inter_rl_len;
}
@@ -349,6 +347,10 @@ static inline void mpeg4_encode_block(MpegEncContext * s,
DCTELEM * block, int n
}
}
#else
+ if (s->mb_intra)
+ rl = &ff_mpeg4_rl_intra;
+ else
+ rl = &ff_h263_rl_inter;
for (; i <= last_index; i++) {
const int slevel = block[ scan_table[i] ];
if (slevel) {
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel