This fixes a bunch of warnings about set-but-unused variables.
---
ffplay.c | 17 ++++++-----------
libavcodec/jpeglsdec.c | 5 ++---
libavformat/nsvdec.c | 8 ++++----
3 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 830346d..b1e90d5 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1454,7 +1454,7 @@ static int output_picture2(VideoState *is, AVFrame
*src_frame, double pts1, int6
static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts,
AVPacket *pkt)
{
- int len1, got_picture, i;
+ int got_picture, i;
if (packet_queue_get(&is->videoq, pkt, 1) < 0)
return -1;
@@ -1482,9 +1482,7 @@ static int get_video_frame(VideoState *is, AVFrame
*frame, int64_t *pts, AVPacke
return 0;
}
- len1 = avcodec_decode_video2(is->video_st->codec,
- frame, &got_picture,
- pkt);
+ avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt);
if (got_picture) {
if (decoder_reorder_pts == -1) {
@@ -1825,7 +1823,7 @@ static int subtitle_thread(void *arg)
VideoState *is = arg;
SubPicture *sp;
AVPacket pkt1, *pkt = &pkt1;
- int len1, got_subtitle;
+ int got_subtitle;
double pts;
int i, j;
int r, g, b, y, u, v, a;
@@ -1859,9 +1857,8 @@ static int subtitle_thread(void *arg)
if (pkt->pts != AV_NOPTS_VALUE)
pts = av_q2d(is->subtitle_st->time_base)*pkt->pts;
- len1 = avcodec_decode_subtitle2(is->subtitle_st->codec,
- &sp->sub, &got_subtitle,
- pkt);
+ avcodec_decode_subtitle2(is->subtitle_st->codec, &sp->sub,
+ &got_subtitle, pkt);
if (got_subtitle && sp->sub.format == 0) {
sp->pts = pts;
@@ -1893,9 +1890,7 @@ static int subtitle_thread(void *arg)
/* copy samples for viewing in editor window */
static void update_sample_display(VideoState *is, short *samples, int
samples_size)
{
- int size, len, channels;
-
- channels = is->audio_st->codec->channels;
+ int size, len;
size = samples_size / sizeof(short);
while (size > 0) {
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 69cc1d3..9c471fa 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -51,10 +51,9 @@
*/
int ff_jpegls_decode_lse(MJpegDecodeContext *s)
{
- int len, id;
+ int id;
- /* XXX: verify len field validity */
- len = get_bits(&s->gb, 16);
+ skip_bits(&s->gb, 16); /* length field */
id = get_bits(&s->gb, 8);
switch(id){
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 5341ce6..be1a331 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -512,7 +512,7 @@ fail:
static int nsv_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
NSVContext *nsv = s->priv_data;
- int i, err;
+ int i;
av_dlog(s, "%s()\n", __FUNCTION__);
av_dlog(s, "filename '%s'\n", s->filename);
@@ -524,17 +524,17 @@ static int nsv_read_header(AVFormatContext *s,
AVFormatParameters *ap)
if (nsv_resync(s) < 0)
return -1;
if (nsv->state == NSV_FOUND_NSVF)
- err = nsv_parse_NSVf_header(s, ap);
+ nsv_parse_NSVf_header(s, ap);
/* we need the first NSVs also... */
if (nsv->state == NSV_FOUND_NSVS) {
- err = nsv_parse_NSVs_header(s, ap);
+ nsv_parse_NSVs_header(s, ap);
break; /* we just want the first one */
}
}
if (s->nb_streams < 1) /* no luck so far */
return -1;
/* now read the first chunk, so we can attempt to decode more info */
- err = nsv_read_chunk(s, 1);
+ nsv_read_chunk(s, 1);
av_dlog(s, "parsed header\n");
return 0;
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel