diff options
author | Mans Rullgard <mans@mansr.com> | 2011-06-01 17:26:27 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-06-02 20:06:00 +0100 |
commit | e65ab9d94f1c8d8893e32d90467d9525625d306a (patch) | |
tree | 032ea02dc36a1510af2807848d961f024e8a052e /libavformat | |
parent | 808d8ff6bb92e641cdd99a0b06767eabd707b925 (diff) | |
download | ffmpeg-e65ab9d94f1c8d8893e32d90467d9525625d306a.tar.gz |
Remove unused variables
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/4xm.c | 4 | ||||
-rw-r--r-- | libavformat/apetag.c | 4 | ||||
-rw-r--r-- | libavformat/asfdec.c | 19 | ||||
-rw-r--r-- | libavformat/avidec.c | 4 | ||||
-rw-r--r-- | libavformat/gif.c | 4 | ||||
-rw-r--r-- | libavformat/mmf.c | 6 | ||||
-rw-r--r-- | libavformat/mov.c | 6 | ||||
-rw-r--r-- | libavformat/oggdec.c | 5 | ||||
-rw-r--r-- | libavformat/oggparseogm.c | 4 | ||||
-rw-r--r-- | libavformat/rl2.c | 6 | ||||
-rw-r--r-- | libavformat/rmdec.c | 4 | ||||
-rw-r--r-- | libavformat/rpl.c | 4 | ||||
-rw-r--r-- | libavformat/rtpdec_latm.c | 5 | ||||
-rw-r--r-- | libavformat/sauce.c | 4 | ||||
-rw-r--r-- | libavformat/smacker.c | 2 | ||||
-rw-r--r-- | libavformat/sol.c | 3 | ||||
-rw-r--r-- | libavformat/yuv4mpeg.c | 4 |
17 files changed, 34 insertions, 54 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c index ff0baaec8f..93c90e8cbc 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -246,7 +246,7 @@ static int fourxm_read_packet(AVFormatContext *s, FourxmDemuxContext *fourxm = s->priv_data; AVIOContext *pb = s->pb; unsigned int fourcc_tag; - unsigned int size, out_size; + unsigned int size; int ret = 0; unsigned int track_number; int packet_read = 0; @@ -295,7 +295,7 @@ static int fourxm_read_packet(AVFormatContext *s, case snd__TAG: track_number = avio_rl32(pb); - out_size= avio_rl32(pb); + avio_skip(pb, 4); size-=8; if (track_number < fourxm->track_count && fourxm->tracks[track_number].channels>0) { diff --git a/libavformat/apetag.c b/libavformat/apetag.c index b8a460a599..6e925354af 100644 --- a/libavformat/apetag.c +++ b/libavformat/apetag.c @@ -35,11 +35,11 @@ static int ape_tag_read_field(AVFormatContext *s) { AVIOContext *pb = s->pb; uint8_t key[1024], *value; - uint32_t size, flags; + uint32_t size; int i, c; size = avio_rl32(pb); /* field size */ - flags = avio_rl32(pb); /* field flags */ + avio_skip(pb, 4); /* field flags */ for (i = 0; i < sizeof(key) - 1; i++) { c = avio_r8(pb); if (c < 0x20 || c > 0x7E) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 30642a61fa..789df1274d 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -216,7 +216,6 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) ff_asf_guid g; enum AVMediaType type; int type_specific_size, sizeX; - uint64_t total_size; unsigned int tag1; int64_t pos1, pos2, start_time; int test_for_ext_stream_audio, is_dvr_ms_audio=0; @@ -264,7 +263,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) return -1; } ff_get_guid(pb, &g); - total_size = avio_rl64(pb); + avio_skip(pb, 8); /* total_size */ type_specific_size = avio_rl32(pb); avio_rl32(pb); st->id = avio_rl16(pb) & 0x7f; /* stream id */ @@ -401,7 +400,7 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size) AVIOContext *pb = s->pb; ff_asf_guid g; int ext_len, payload_ext_ct, stream_ct, i; - uint32_t ext_d, leak_rate, stream_num; + uint32_t leak_rate, stream_num; unsigned int stream_languageid_index; avio_rl64(pb); // starttime @@ -435,7 +434,7 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size) for (i=0; i<payload_ext_ct; i++){ ff_get_guid(pb, &g); - ext_d=avio_rl16(pb); + avio_skip(pb, 2); ext_len=avio_rl32(pb); avio_skip(pb, ext_len); } @@ -519,7 +518,7 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size) { AVIOContext *pb = s->pb; ASFContext *asf = s->priv_data; - int n, stream_num, name_len, value_len, value_type, value_num; + int n, stream_num, name_len, value_len, value_num; int ret, i; n = avio_rl16(pb); @@ -529,7 +528,7 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size) avio_rl16(pb); //lang_list_index stream_num= avio_rl16(pb); name_len= avio_rl16(pb); - value_type= avio_rl16(pb); + avio_skip(pb, 2); /* value_type */ value_len= avio_rl32(pb); if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len) @@ -634,10 +633,8 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) // if so the next iteration will pick it up continue; } else if (!ff_guidcmp(&g, &ff_asf_head1_guid)) { - int v1, v2; ff_get_guid(pb, &g); - v1 = avio_rl32(pb); - v2 = avio_rl16(pb); + avio_skip(pb, 6); continue; } else if (!ff_guidcmp(&g, &ff_asf_marker_header)) { asf_read_marker(s, gsize); @@ -807,7 +804,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){ ASFContext *asf = s->priv_data; int rsize = 1; int num = avio_r8(pb); - int64_t ts0, ts1; + int64_t ts0; asf->packet_segments--; asf->packet_key_frame = num >> 7; @@ -830,7 +827,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){ // av_log(s, AV_LOG_DEBUG, "\n"); avio_skip(pb, 10); ts0= avio_rl64(pb); - ts1= avio_rl64(pb); + avio_skip(pb, 8);; avio_skip(pb, 12); avio_rl32(pb); avio_skip(pb, asf->packet_replic_size - 8 - 38 - 4); diff --git a/libavformat/avidec.c b/libavformat/avidec.c index a9ff688a86..ff270edae5 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -337,7 +337,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) AVIContext *avi = s->priv_data; AVIOContext *pb = s->pb; unsigned int tag, tag1, handler; - int codec_type, stream_index, frame_period, bit_rate; + int codec_type, stream_index, frame_period; unsigned int size; int i; AVStream *st; @@ -407,7 +407,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) /* AVI header */ /* using frame_period is bad idea */ frame_period = avio_rl32(pb); - bit_rate = avio_rl32(pb) * 8; + avio_skip(pb, 4); avio_rl32(pb); avi->non_interleaved |= avio_rl32(pb) & AVIF_MUSTUSEINDEX; diff --git a/libavformat/gif.c b/libavformat/gif.c index dfd2ec16e8..55deb4d207 100644 --- a/libavformat/gif.c +++ b/libavformat/gif.c @@ -295,9 +295,7 @@ static int gif_write_video(AVFormatContext *s, AVCodecContext *enc, const uint8_t *buf, int size) { AVIOContext *pb = s->pb; - GIFContext *gif = s->priv_data; int jiffies; - int64_t delay; /* graphic control extension block */ avio_w8(pb, 0x21); @@ -307,8 +305,6 @@ static int gif_write_video(AVFormatContext *s, /* 1 jiffy is 1/70 s */ /* the delay_time field indicates the number of jiffies - 1 */ - delay = gif->file_time - gif->time; - /* XXX: should use delay, in order to be more accurate */ /* instead of using the same rounded value each time */ /* XXX: don't even remember if I really use it for now */ diff --git a/libavformat/mmf.c b/libavformat/mmf.c index ec99c2d0dd..3848d5cf56 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -186,13 +186,13 @@ static int mmf_read_header(AVFormatContext *s, unsigned int tag; AVIOContext *pb = s->pb; AVStream *st; - int64_t file_size, size; + int64_t size; int rate, params; tag = avio_rl32(pb); if (tag != MKTAG('M', 'M', 'M', 'D')) return -1; - file_size = avio_rb32(pb); + avio_skip(pb, 4); /* file_size */ /* Skip some unused chunks that may or may not be present */ for(;; avio_skip(pb, size)) { @@ -263,12 +263,10 @@ static int mmf_read_packet(AVFormatContext *s, AVPacket *pkt) { MMFContext *mmf = s->priv_data; - AVStream *st; int ret, size; if (s->pb->eof_reached) return AVERROR(EIO); - st = s->streams[0]; size = MAX_SIZE; if(size > mmf->data_size) diff --git a/libavformat/mov.c b/libavformat/mov.c index cede1f751a..8ec0d19ed2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -464,21 +464,21 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom) int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom) { AVStream *st; - int tag, len; + int tag; if (fc->nb_streams < 1) return 0; st = fc->streams[fc->nb_streams-1]; avio_rb32(pb); /* version + flags */ - len = ff_mp4_read_descr(fc, pb, &tag); + ff_mp4_read_descr(fc, pb, &tag); if (tag == MP4ESDescrTag) { avio_rb16(pb); /* ID */ avio_r8(pb); /* priority */ } else avio_rb16(pb); /* ID */ - len = ff_mp4_read_descr(fc, pb, &tag); + ff_mp4_read_descr(fc, pb, &tag); if (tag == MP4DecConfigDescrTag) ff_mp4_read_dec_config_descr(fc, st, pb); return 0; diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 67678059a1..9562ea9ec0 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -196,8 +196,6 @@ static int ogg_read_page(AVFormatContext *s, int *str) int flags, nsegs; uint64_t gp; uint32_t serial; - uint32_t seq; - uint32_t crc; int size, idx; uint8_t sync[4]; int sp = 0; @@ -230,8 +228,7 @@ static int ogg_read_page(AVFormatContext *s, int *str) flags = avio_r8(bc); gp = avio_rl64 (bc); serial = avio_rl32 (bc); - seq = avio_rl32 (bc); - crc = avio_rl32 (bc); + avio_skip(bc, 8); /* seq, crc */ nsegs = avio_r8(bc); idx = ogg_find_stream (ogg, serial); diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c index dda5be601a..9526c3acc1 100644 --- a/libavformat/oggparseogm.c +++ b/libavformat/oggparseogm.c @@ -39,7 +39,6 @@ ogm_header(AVFormatContext *s, int idx) const uint8_t *p = os->buf + os->pstart; uint64_t time_unit; uint64_t spu; - uint32_t default_len; if(!(*p & 1)) return 0; @@ -74,8 +73,7 @@ ogm_header(AVFormatContext *s, int idx) time_unit = bytestream_get_le64(&p); spu = bytestream_get_le64(&p); - default_len = bytestream_get_le32(&p); - + p += 4; /* default_len */ p += 8; /* buffersize + bits_per_sample */ if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ diff --git a/libavformat/rl2.c b/libavformat/rl2.c index f2d68384b8..b4172c284a 100644 --- a/libavformat/rl2.c +++ b/libavformat/rl2.c @@ -80,8 +80,6 @@ static av_cold int rl2_read_header(AVFormatContext *s, unsigned int audio_frame_counter = 0; unsigned int video_frame_counter = 0; unsigned int back_size; - int data_size; - unsigned short encoding_method; unsigned short sound_rate; unsigned short rate; unsigned short channels; @@ -98,14 +96,14 @@ static av_cold int rl2_read_header(AVFormatContext *s, avio_skip(pb,4); /* skip FORM tag */ back_size = avio_rl32(pb); /**< get size of the background frame */ signature = avio_rb32(pb); - data_size = avio_rb32(pb); + avio_skip(pb, 4); /* data size */ frame_count = avio_rl32(pb); /* disallow back_sizes and frame_counts that may lead to overflows later */ if(back_size > INT_MAX/2 || frame_count > INT_MAX / sizeof(uint32_t)) return AVERROR_INVALIDDATA; - encoding_method = avio_rl16(pb); + avio_skip(pb, 2); /* encoding mentod */ sound_rate = avio_rl16(pb); rate = avio_rl16(pb); channels = avio_rl16(pb); diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 843706dec3..d6a5251c05 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -280,7 +280,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, if (rm_read_audio_stream_info(s, pb, st, rst, 0)) return -1; } else { - int fps, fps2; + int fps; if (avio_rl32(pb) != MKTAG('V', 'I', 'D', 'O')) { fail1: av_log(st->codec, AV_LOG_ERROR, "Unsupported video codec\n"); @@ -298,7 +298,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, fps= avio_rb16(pb); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; avio_rb32(pb); - fps2= avio_rb16(pb); + avio_skip(pb, 2); avio_rb16(pb); if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (avio_tell(pb) - codec_pos))) < 0) diff --git a/libavformat/rpl.c b/libavformat/rpl.c index 1ca4a86d1b..935b81d7d8 100644 --- a/libavformat/rpl.c +++ b/libavformat/rpl.c @@ -299,9 +299,9 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt) stream->codec->codec_tag == 124) { // We have to split Escape 124 frames because there are // multiple frames per chunk in Escape 124 samples. - uint32_t frame_size, frame_flags; + uint32_t frame_size; - frame_flags = avio_rl32(pb); + avio_skip(pb, 4); /* flags */ frame_size = avio_rl32(pb); if (avio_seek(pb, -8, SEEK_CUR) < 0) return AVERROR(EIO); diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c index bde34b7ab9..42317a9529 100644 --- a/libavformat/rtpdec_latm.c +++ b/libavformat/rtpdec_latm.c @@ -108,8 +108,7 @@ static int parse_fmtp_config(AVStream *st, char *value) int len = ff_hex_to_data(NULL, value), i, ret = 0; GetBitContext gb; uint8_t *config; - int audio_mux_version, same_time_framing, num_sub_frames, - num_programs, num_layers; + int audio_mux_version, same_time_framing, num_programs, num_layers; /* Pad this buffer, too, to avoid out of bounds reads with get_bits below */ config = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE); @@ -119,7 +118,7 @@ static int parse_fmtp_config(AVStream *st, char *value) init_get_bits(&gb, config, len*8); audio_mux_version = get_bits(&gb, 1); same_time_framing = get_bits(&gb, 1); - num_sub_frames = get_bits(&gb, 6); + skip_bits(&gb, 6); /* num_sub_frames */ num_programs = get_bits(&gb, 4); num_layers = get_bits(&gb, 3); if (audio_mux_version != 0 || same_time_framing != 1 || num_programs != 0 || diff --git a/libavformat/sauce.c b/libavformat/sauce.c index cf33ab7be7..f9ca17ac30 100644 --- a/libavformat/sauce.c +++ b/libavformat/sauce.c @@ -32,7 +32,7 @@ int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int g { AVIOContext *pb = avctx->pb; char buf[36]; - int datatype, filetype, t1, t2, nb_comments, flags; + int datatype, filetype, t1, t2, nb_comments; uint64_t start_pos = avio_size(pb) - 128; avio_seek(pb, start_pos, SEEK_SET); @@ -57,7 +57,7 @@ int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int g t1 = avio_rl16(pb); t2 = avio_rl16(pb); nb_comments = avio_r8(pb); - flags = avio_r8(pb); + avio_skip(pb, 1); /* flags */ avio_skip(pb, 4); GET_SAUCE_META("encoder", 22); diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 01d1303ae3..db9a02bb6c 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -233,7 +233,6 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt) int i; int frame_size = 0; int palchange = 0; - int pos; if (s->pb->eof_reached || smk->cur_frame >= smk->frames) return AVERROR_EOF; @@ -244,7 +243,6 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt) frame_size = smk->frm_size[smk->cur_frame] & (~3); flags = smk->frm_flags[smk->cur_frame]; /* handle palette change event */ - pos = avio_tell(s->pb); if(flags & SMACKER_PAL){ int size, sz, t, off, j, pos; uint8_t *pal = smk->pal; diff --git a/libavformat/sol.c b/libavformat/sol.c index 1c9ce69538..1ebb4d2e30 100644 --- a/libavformat/sol.c +++ b/libavformat/sol.c @@ -85,7 +85,6 @@ static int sol_channels(int magic, int type) static int sol_read_header(AVFormatContext *s, AVFormatParameters *ap) { - int size; unsigned int magic,tag; AVIOContext *pb = s->pb; unsigned int id, channels, rate, type; @@ -99,7 +98,7 @@ static int sol_read_header(AVFormatContext *s, return -1; rate = avio_rl16(pb); type = avio_r8(pb); - size = avio_rl32(pb); + avio_skip(pb, 4); /* size */ if (magic != 0x0B8D) avio_r8(pb); /* newer SOLs contain padding byte */ diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c index d712321162..9a6a0c8315 100644 --- a/libavformat/yuv4mpeg.c +++ b/libavformat/yuv4mpeg.c @@ -94,7 +94,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) AVPicture *picture; int* first_pkt = s->priv_data; int width, height, h_chroma_shift, v_chroma_shift; - int i, m; + int i; char buf2[Y4M_LINE_MAX+1]; char buf1[20]; uint8_t *ptr, *ptr1, *ptr2; @@ -114,7 +114,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) /* construct frame header */ - m = snprintf(buf1, sizeof(buf1), "%s\n", Y4M_FRAME_MAGIC); + snprintf(buf1, sizeof(buf1), "%s\n", Y4M_FRAME_MAGIC); avio_write(pb, buf1, strlen(buf1)); width = st->codec->width; |