]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
kill warnings patch by (Måns Rullgård <mru inprovide com>)
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 24 Feb 2005 19:08:50 +0000 (19:08 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 24 Feb 2005 19:08:50 +0000 (19:08 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3977 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

42 files changed:
ffmpeg.c
libavcodec/adx.c
libavcodec/avcodec.h
libavcodec/cabac.h
libavcodec/cljr.c
libavcodec/common.h
libavcodec/dsputil.c
libavcodec/faad.c
libavcodec/flac.c
libavcodec/h263.c
libavcodec/mem.c
libavcodec/mjpeg.c
libavcodec/motion_est.c
libavcodec/motion_est_template.c
libavcodec/mp3lameaudio.c
libavcodec/mpegaudio.c
libavcodec/mpegaudiodec.c
libavcodec/mpegvideo.c
libavcodec/parser.c
libavcodec/rangecoder.c
libavcodec/rangecoder.h
libavcodec/resample.c
libavcodec/rv10.c
libavcodec/sonic.c
libavcodec/svq1.c
libavcodec/utils.c
libavcodec/vcr1.c
libavcodec/wmv2.c
libavformat/ffm.c
libavformat/flvdec.c
libavformat/http.c
libavformat/img2.c
libavformat/mov.c
libavformat/movenc.c
libavformat/mpeg.c
libavformat/nsvdec.c
libavformat/nut.c
libavformat/psxstr.c
libavformat/tcp.c
libavformat/udp.c
libavformat/utils.c
output_example.c

index 98ba75a5f7aa0139722e6fd954732d45d2e39e6f..6728ab7fc75c1d89398eba26de093a353e2decd9 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3740,7 +3740,7 @@ void opt_intra_matrix(const char *arg)
 static void opt_target(const char *arg)
 {
     int norm = -1;
-    static const char const *frame_rates[] = {"25", "30000/1001", "24000/1001"};
+    static const char *const frame_rates[] = {"25", "30000/1001", "24000/1001"};
 
     if(!strncmp(arg, "pal-", 4)) {
         norm = 0;
index e41a7572660e95665c9ec8e3a17c23d2dc1c8be0..a52575c13fc783ffad42884d3fe032e7544ad5fd 100644 (file)
@@ -314,6 +314,7 @@ static int adx_decode_init(AVCodecContext * avctx)
     return 0;
 }
 
+#if 0
 static void dump(unsigned char *buf,size_t len)
 {
     int i;
@@ -324,6 +325,8 @@ static void dump(unsigned char *buf,size_t len)
     }
     av_log(NULL, AV_LOG_ERROR, "\n");
 }
+#endif
+
 static int adx_decode_frame(AVCodecContext *avctx,
                 void *data, int *data_size,
                 uint8_t *buf0, int buf_size)
index 2a0247392820f0502b58e93f37d34f22e6c83180..cebc0647653eaf38729badeb1b24ddf32d605a1e 100644 (file)
@@ -2201,6 +2201,8 @@ void avcodec_register_all(void);
 
 void avcodec_flush_buffers(AVCodecContext *avctx);
 
+void avcodec_default_free_buffers(AVCodecContext *s);
+
 /* misc usefull functions */
 
 /**
index 67fa3b988ce010a8361a6d856d4e6fd441d47076..cc03eba960d6c7ef337bccb687e80043a8629026 100644 (file)
@@ -264,6 +264,7 @@ static void refill(CABACContext *c){
     c->bytestream+= CABAC_BITS/8;
 }
 
+#if 0 /* all use commented */
 static void refill2(CABACContext *c){
     int i, x;
 
@@ -282,7 +283,7 @@ static void refill2(CABACContext *c){
     c->low += x<<i;
     c->bytestream+= CABAC_BITS/8;
 }
-
+#endif
 
 static inline void renorm_cabac_decoder(CABACContext *c){
     while(c->range < (0x200 << CABAC_BITS)){
@@ -303,7 +304,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
 
 static inline int get_cabac(CABACContext *c, uint8_t * const state){
     int RangeLPS= c->lps_range[*state][c->range>>(CABAC_BITS+7)]<<(CABAC_BITS+1);
-    int bit, lps_mask;
+    int bit, lps_mask attribute_unused;
     
     c->range -= RangeLPS;
 #if 1
index c17316b3e0951e5c01633938b634e5efc888df4a..8072eee1827968c803ffa762944d1acae4838c19 100644 (file)
@@ -119,12 +119,14 @@ static int decode_init(AVCodecContext *avctx){
     return 0;
 }
 
+#if 0
 static int encode_init(AVCodecContext *avctx){
 
     common_init(avctx);
     
     return 0;
 }
+#endif
 
 AVCodec cljr_decoder = {
     "cljr",
index ec81297ba25940dc880cf673f78ac7f9ae4a3124..8268ee79b903fe5c8c936142244f597a39cfa7ad 100644 (file)
@@ -85,6 +85,14 @@ extern const struct AVOption avoptions_workaround_bug[11];
 #endif
 #endif
 
+#ifndef attribute_unused
+#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
+#    define attribute_unused __attribute__((unused))
+#else
+#    define attribute_unused
+#endif
+#endif
+
 #ifndef EMULATE_INTTYPES
 #   include <inttypes.h>
 #else
index 0fd76a66bd9ac585bb5ba04d667cd6d010337623..926832ff1662327280ae8ec47f0e335859c07b07 100644 (file)
@@ -31,6 +31,9 @@
 #include "simple_idct.h"
 #include "faandct.h"
 
+/* snow.c */
+void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, int decomposition_count);
+
 uint8_t cropTbl[256 + 2 * MAX_NEG_CROP] = {0, };
 uint32_t squareTbl[512] = {0, };
 
@@ -2378,7 +2381,7 @@ H264_MC(avg_, 16)
 #define op_scale2(x)  dst[x] = clip_uint8( (src[x]*weights + dst[x]*weightd + offset) >> (log2_denom+1))
 #define H264_WEIGHT(W,H) \
 static void weight_h264_pixels ## W ## x ## H ## _c(uint8_t *block, int stride, int log2_denom, int weight, int offset){ \
-    int x, y; \
+    int attribute_unused x, y; \
     offset <<= log2_denom; \
     if(log2_denom) offset += 1<<(log2_denom-1); \
     for(y=0; y<H; y++, block += stride){ \
@@ -2404,7 +2407,7 @@ static void weight_h264_pixels ## W ## x ## H ## _c(uint8_t *block, int stride,
     } \
 } \
 static void biweight_h264_pixels ## W ## x ## H ## _c(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offsetd, int offsets){ \
-    int x, y; \
+    int attribute_unused x, y; \
     int offset = (offsets + offsetd + 1) >> 1; \
     offset = ((offset << 1) + 1) << log2_denom; \
     for(y=0; y<H; y++, dst += stride, src += stride){ \
index 236b250d5d1e9c83e9736dad8ed9dfeeededad43..eff051bd45700561e43bd3a29b4807ab0fc99563 100644 (file)
@@ -86,7 +86,7 @@ typedef struct {
                                         faacDecFrameInfo *hInfo,
                                         unsigned char *buffer,
                                                                 unsigned long buffer_size);
-       unsigned char* FAADAPI (*faacDecGetErrorMessage)(unsigned char errcode);
+       char* FAADAPI (*faacDecGetErrorMessage)(unsigned char errcode);
 #endif
     
     void FAADAPI (*faacDecClose)(faacDecHandle hDecoder);
@@ -126,11 +126,6 @@ static int faac_init_mp4(AVCodecContext *avctx)
     return r;
 }
 
-static int faac_init_aac(AVCodecContext *avctx)
-{
-    return 0;
-}
-
 static int faac_decode_frame(AVCodecContext *avctx,
                              void *data, int *data_size,
                              uint8_t *buf, int buf_size)
@@ -239,7 +234,7 @@ static int faac_decode_init(AVCodecContext *avctx)
                                       unsigned char*)));
        dfaac(Decode, (void *FAADAPI (*)(faacDecHandle, faacDecFrameInfo*,
                             unsigned char*, unsigned long)));
-       dfaac(GetErrorMessage, (unsigned char* FAADAPI (*)(unsigned char)));
+       dfaac(GetErrorMessage, (char* FAADAPI (*)(unsigned char)));
 #endif
 #undef dfacc
 
index a640b900b443ec6c58720d0d47f9b71fcf6ea784..de1c5255ce225a77e7a2247e984963b18cd9cdfb 100644 (file)
@@ -143,6 +143,7 @@ static int64_t get_utf8(GetBitContext *gb)
     return val;
 }
 
+#if 0
 static int skip_utf8(GetBitContext *gb)
 {
     int ones=0, bytes;
@@ -163,6 +164,7 @@ static int skip_utf8(GetBitContext *gb)
     }
     return 0;
 }
+#endif
 
 static int get_crc8(const uint8_t *buf, int count){
     int crc=0;
index ad496344b96b51abdb6e87f56dee7123280418ac..d0a6e95347650ee9cad4ae2f41ddc5589eb9015f 100644 (file)
@@ -1940,7 +1940,6 @@ static void init_uni_h263_rl_tab(RLTable *rl, uint32_t *bits_tab, uint8_t *len_t
                 int level= slevel < 0 ? -slevel : slevel;
                 int sign= slevel < 0 ? 1 : 0;
                 int bits, len, code;
-                int level1, run1;
                 
                 len_tab[index]= 100;
                      
index 04fcd5b39509ca01eafc8d4a210d2a578b817603..462d674e451166642c49da6f171a37d628dbd9cb 100644 (file)
@@ -45,7 +45,9 @@
 void *av_malloc(unsigned int size)
 {
     void *ptr;
+#ifdef MEMALIGN_HACK
     int diff;
+#endif
 
     /* lets disallow possible ambiguous cases */
     if(size > INT_MAX)
@@ -97,7 +99,10 @@ void *av_malloc(unsigned int size)
  */
 void *av_realloc(void *ptr, unsigned int size)
 {
+#ifdef MEMALIGN_HACK
     int diff;
+#endif
+
     /* lets disallow possible ambiguous cases */
     if(size > INT_MAX)
         return NULL;
index 6ea01b3b847ca7f24992e6333153693aaa218e41..4c2b4793bf36670fbeab18f92c50bb477c84f3cf 100644 (file)
@@ -676,7 +676,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in
     if(avctx->pix_fmt == PIX_FMT_RGBA32){
         int x, y, i;
         const int linesize= p->linesize[0];
-        uint16_t (*buffer)[4]= s->rd_scratchpad;
+        uint16_t (*buffer)[4]= (void *) s->rd_scratchpad;
         int left[3], top[3], topleft[3];
 
         for(i=0; i<3; i++){
index eebd8c2a348f7a18263fba775f3ee97c52c5fd24..2c1ff5094667a05ede0c803bf375cdaf992b220d 100644 (file)
@@ -317,6 +317,7 @@ static inline void no_motion_search(MpegEncContext * s,
     *my_ptr = 16 * s->mb_y;
 }
 
+#if 0  /* the use of these functions is inside #if 0 */
 static int full_motion_search(MpegEncContext * s,
                               int *mx_ptr, int *my_ptr, int range,
                               int xmin, int ymin, int xmax, int ymax, uint8_t *ref_picture)
@@ -537,7 +538,7 @@ static int phods_motion_search(MpegEncContext * s,
     *my_ptr = my;
     return dminy;
 }
-
+#endif /* 0 */
 
 #define Z_THRESHOLD 256
 
@@ -730,7 +731,6 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift)
     int dmin_sum=0, mx4_sum=0, my4_sum=0;
     int same=1;
     const int stride= c->stride;
-    const int uvstride= c->uvstride;
     uint8_t *mv_penalty= c->current_mv_penalty;
 
     init_mv4_ref(c);
@@ -881,7 +881,6 @@ static int interlaced_search(MpegEncContext *s, int ref_index,
     uint8_t * const mv_penalty= c->current_mv_penalty;
     int same=1;
     const int stride= 2*s->linesize;
-    const int uvstride= 2*s->uvlinesize;
     int dmin_sum= 0;
     const int mot_stride= s->mb_stride;
     const int xy= s->mb_x + s->mb_y*mot_stride;
index 1f5c742a41b6f941e10011dd4cb83e37a238a486..d8101ec3345a824d756efbfad8821869a567cd2c 100644 (file)
 
 //lets hope gcc will remove the unused vars ...(gcc 3.2.2 seems to do it ...)
 #define LOAD_COMMON\
-    uint32_t * const score_map= c->score_map;\
-    const int xmin= c->xmin;\
-    const int ymin= c->ymin;\
-    const int xmax= c->xmax;\
-    const int ymax= c->ymax;\
+    uint32_t attribute_unused * const score_map= c->score_map;\
+    const int attribute_unused xmin= c->xmin;\
+    const int attribute_unused ymin= c->ymin;\
+    const int attribute_unused xmax= c->xmax;\
+    const int attribute_unused ymax= c->ymax;\
     uint8_t *mv_penalty= c->current_mv_penalty;\
     const int pred_x= c->pred_x;\
     const int pred_y= c->pred_y;\
index ce02ff0c106084fdb1766cf671921f86f98f1f55..3f10a1025c7b60114a80950f43b9f83ff9900d7f 100644 (file)
@@ -132,7 +132,7 @@ int MP3lame_encode_frame(AVCodecContext *avctx,
                      unsigned char *frame, int buf_size, void *data)
 {
        Mp3AudioContext *s = avctx->priv_data;
-       int len, i;
+       int len;
        int lame_result;
 
        /* lame 3.91 dies on '1-channel interleaved' data */
index e4b2576356e3a8dc2c79f004198f5001a446a619..d521acc588c99df03a1bac48861e1183f86a06b3 100644 (file)
@@ -468,6 +468,7 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT],
             break;
         default:
             assert(0); //cant happen
+            code = 0;           /* kill warning */
         }
         
 #if 0
index bfff570a2d8131b27f8565aa7d6d3f5a5c2485e7..d828ed65e9309e816feddee71c00cfcbb17e6caa 100644 (file)
@@ -257,11 +257,13 @@ static inline int l3_unscale(int value, int exponent)
 
 static int dev_4_3_coefs[DEV_ORDER];
 
+#if 0 /* unused */
 static int pow_mult3[3] = {
     POW_FIX(1.0),
     POW_FIX(1.25992104989487316476),
     POW_FIX(1.58740105196819947474),
 };
+#endif
 
 static void int_pow_init(void)
 {
@@ -274,6 +276,7 @@ static void int_pow_init(void)
     }
 }
 
+#if 0 /* unused, remove? */
 /* return the mantissa and the binary exponent */
 static int int_pow(int i, int *exp_ptr)
 {
@@ -318,6 +321,7 @@ static int int_pow(int i, int *exp_ptr)
     *exp_ptr = eq;
     return a;
 }
+#endif
 
 static int decode_init(AVCodecContext * avctx)
 {
index 0860fd97ad2a683d9b5d42257b97a2561673f4fa..002c2a64d7934a3affad473970a3b97a4573c9f8 100644 (file)
@@ -1820,7 +1820,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){
                       for(i=0; i<4; i++){
                         int sx= mb_x*16 + 4 + 8*(i&1);
                         int sy= mb_y*16 + 4 + 8*(i>>1);
-                        int xy= (mb_x*2 + (i&1) + (mb_y*2 + (i>>1))*mv_stride) << mv_sample_log2-1;
+                        int xy= (mb_x*2 + (i&1) + (mb_y*2 + (i>>1))*mv_stride) << (mv_sample_log2-1);
                         int mx= (pict->motion_val[direction][xy][0]>>shift) + sx;
                         int my= (pict->motion_val[direction][xy][1]>>shift) + sy;
                         draw_arrow(ptr, sx, sy, mx, my, width, height, s->linesize, 100);
@@ -1830,7 +1830,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){
                       for(i=0; i<2; i++){
                         int sx=mb_x*16 + 8;
                         int sy=mb_y*16 + 4 + 8*i;
-                        int xy= (mb_x*2 + (mb_y*2 + i)*mv_stride) << mv_sample_log2-1;
+                        int xy= (mb_x*2 + (mb_y*2 + i)*mv_stride) << (mv_sample_log2-1);
                         int mx=(pict->motion_val[direction][xy][0]>>shift);
                         int my=(pict->motion_val[direction][xy][1]>>shift);
                         
@@ -1844,7 +1844,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){
                       for(i=0; i<2; i++){
                         int sx=mb_x*16 + 4 + 8*i;
                         int sy=mb_y*16 + 8;
-                        int xy= (mb_x*2 + i + mb_y*2*mv_stride) << mv_sample_log2-1;
+                        int xy= (mb_x*2 + i + mb_y*2*mv_stride) << (mv_sample_log2-1);
                         int mx=(pict->motion_val[direction][xy][0]>>shift);
                         int my=(pict->motion_val[direction][xy][1]>>shift);
                         
@@ -2077,7 +2077,6 @@ static int skip_check(MpegEncContext *s, Picture *p, Picture *ref){
     int x, y, plane;
     int score=0;
     int64_t score64=0;
-    int64_t threshold;
 
     for(plane=0; plane<3; plane++){
         const int stride= p->linesize[plane];
index 780b7043abd1e8f43a760f5fa9a9e9b4deb85328..421a95f0395467ec27623b2a4486294679c6b013 100644 (file)
@@ -504,6 +504,7 @@ typedef struct MpegAudioParseContext {
 #define MPA_HEADER_SIZE 4
 
 /* header + layer + bitrate + freq + lsf/mpeg25 */
+#undef SAME_HEADER_MASK /* mpegaudio.h defines different version */
 #define SAME_HEADER_MASK \
    (0xffe00000 | (3 << 17) | (3 << 10) | (3 << 19))
 
index 159607c652371e2e24209568b99dd8f28e6f11dc..ba3022c45c315ecd0fd8d82b1925107702c34986 100644 (file)
@@ -58,7 +58,7 @@ void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf, int buf_size){
 void ff_build_rac_states(RangeCoder *c, int factor, int max_p){
     const int64_t one= 1LL<<32;
     int64_t p;
-    int last_p8, p8, i, j;
+    int last_p8, p8, i;
 
     memset(c->zero_state, 0, sizeof(c->zero_state));
     memset(c-> one_state, 0, sizeof(c-> one_state));
index 1d68b9ac9ae815610398c458ad42c4ab2837873f..6fd7b43bfb73479337b5766171204da7d53fff14 100644 (file)
@@ -94,7 +94,7 @@ static inline void refill(RangeCoder *c){
 
 static inline int get_rac(RangeCoder *c, uint8_t * const state){
     int range1= (c->range * (*state)) >> 8;
-    int one_mask;
+    int attribute_unused one_mask;
     
     c->range -= range1;
 #if 1
index 02c1fd8fe661071df79da0cb093f27aa0f0d87a2..77e5f5f47ddb4837a39cf489e53806c2985e38d5 100644 (file)
@@ -128,7 +128,6 @@ ReSampleContext *audio_resample_init(int output_channels, int input_channels,
                                       int output_rate, int input_rate)
 {
     ReSampleContext *s;
-    int i;
     
     if ( input_channels > 2)
       {
index 9fb1e8df1acc6b377f9626bffd2521803d7283a1..884be9c7c90377c4cda36861001437e5e660aece 100644 (file)
@@ -287,6 +287,7 @@ void rv20_encode_picture_header(MpegEncContext *s, int picture_number){
     }
 }
 
+#if 0 /* unused, remove? */
 static int get_num(GetBitContext *gb)
 {
     int n, n1;
@@ -299,6 +300,7 @@ static int get_num(GetBitContext *gb)
         return (n << 16) | n1;
     }
 }
+#endif
 
 #endif //CONFIG_ENCODERS
 
index 3981f3bd7dbb7cc334207d1be51ee47130d250e2..d9c05faecd528750663d4b2dafe2634e02082e04 100644 (file)
@@ -845,7 +845,7 @@ static int sonic_decode_close(AVCodecContext *avctx)
 }
 
 static int sonic_decode_frame(AVCodecContext *avctx,
-                           int16_t *data, int *data_size,
+                           void *data, int *data_size,
                            uint8_t *buf, int buf_size)
 {
     SonicContext *s = avctx->priv_data;
index f5c3c7774a497dd83e3a311b647ee251db34f150..068dd51d37e795806425d61f605e7371c0a42ec7 100644 (file)
@@ -600,6 +600,7 @@ static uint16_t svq1_packet_checksum (uint8_t *data, int length, int value) {
   return value;
 }
 
+#if 0 /* unused, remove? */
 static uint16_t svq1_component_checksum (uint16_t *pixels, int pitch,
                                          int width, int height, int value) {
   int x, y;
@@ -614,6 +615,7 @@ static uint16_t svq1_component_checksum (uint16_t *pixels, int pitch,
 
   return value;
 }
+#endif
 
 static void svq1_parse_string (GetBitContext *bitbuf, uint8_t *out) {
   uint8_t seed;
index 99de9d38c60bacb5225fddc6b0e318080bc2e170..5c9c2425f89bce7510062c9d08e838a2d534ae9b 100644 (file)
@@ -677,18 +677,6 @@ AVCodec *avcodec_find_decoder_by_name(const char *name)
     return NULL;
 }
 
-static AVCodec *avcodec_find(enum CodecID id)
-{
-    AVCodec *p;
-    p = first_avcodec;
-    while (p) {
-        if (p->id == id)
-            return p;
-        p = p->next;
-    }
-    return NULL;
-}
-
 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
 {
     const char *codec_name;
index 5a55d9f7faf687720f22d25ad0443902cf7ebc7d..442ad9136716ab4f1426ad13d2cda80af3f4ded3 100644 (file)
@@ -151,12 +151,14 @@ static int decode_init(AVCodecContext *avctx){
     return 0;
 }
 
+#if 0
 static int encode_init(AVCodecContext *avctx){
  
     common_init(avctx);
     
     return 0;
 }
+#endif
 
 AVCodec vcr1_decoder = {
     "vcr1",
index 0f505a8f1945bd0a5e1013bad63bd5c2c44edaa9..b6376d80b6a037248ed092048551898446a05fef 100644 (file)
@@ -101,6 +101,7 @@ static int wmv2_encode_init(AVCodecContext *avctx){
     return 0;
 }
 
+#if 0 /* unused, remove? */
 static int wmv2_encode_end(AVCodecContext *avctx){
     
     if(MPV_encode_end(avctx) < 0)
@@ -111,6 +112,7 @@ static int wmv2_encode_end(AVCodecContext *avctx){
     
     return 0;
 }
+#endif
 
 int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number)
 {
index 2867d11e0f4e6e414e1287ea8d03312122462f9d..7640d656c99a818401497b92914ab1df8813d873 100644 (file)
@@ -261,7 +261,6 @@ static int ffm_write_trailer(AVFormatContext *s)
 {
     ByteIOContext *pb = &s->pb;
     FFMContext *ffm = s->priv_data;
-    int i;
 
     /* flush packets */
     if (ffm->packet_ptr > ffm->packet)
index 157b50dc640b20c0bb879c25d42ebe535f7b486c..f9f4fbe40bfcb11178ed4bea4e8090f11efbfeaa 100644 (file)
@@ -44,7 +44,6 @@ static int flv_read_header(AVFormatContext *s,
                            AVFormatParameters *ap)
 {
     int offset, flags;
-    AVStream *st;
     
     s->ctx_flags |= AVFMTCTX_NOHEADER; //ok we have a header but theres no fps, codec type, sample_rate, ...
 
index 85b1f319bd595ad768ee772abaec366f233ac98d..2198cd548db8a9151b1dfaa5c80f8d5b10f05111 100644 (file)
@@ -49,7 +49,7 @@ typedef struct {
 static int http_connect(URLContext *h, const char *path, const char *hoststr,
                         const char *auth);
 static int http_write(URLContext *h, uint8_t *buf, int size);
-static char *b64_encode( unsigned char *src );
+static char *b64_encode(const unsigned char *src );
 
 
 /* return non zero if error */
@@ -287,7 +287,7 @@ URLProtocol http_protocol = {
  * b64_encode: stolen from VLC's http.c
  *****************************************************************************/
                                                                                 
-static char *b64_encode( unsigned char *src )
+static char *b64_encode( const unsigned char *src )
 {
     static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
     unsigned int len= strlen(src);
index fcf7310208b23f086458aa5f637106b5408ee0c8..4cfd9eb6ba5a3311cf68ea7e6ff7aa95638f25ec 100644 (file)
@@ -97,16 +97,6 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
     return CODEC_ID_NONE;
 }
 
-static const char *av_id2str(const IdStrMap *tags, enum CodecID id)
-{
-    while (tags->id) {
-        if(tags->id == id)
-            return tags->str;
-        tags++;
-    }
-    return NULL;
-}
-
 /* return -1 if no image found */
 static int find_image_range(int *pfirst_index, int *plast_index, 
                             const char *path)
index 1378b97ec54175ec74b84a91518dba8d944e2a47..87acdd419f754b1a16f7930727f8d4523fe51ec1 100644 (file)
@@ -415,12 +415,12 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 
 static int mov_read_ctab(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
-    unsigned int len;
-    MOV_ctab_t *t;
 #if 1
     url_fskip(pb, atom.size); // for now
 #else
     VERY VERY BROKEN, NEVER execute this, needs rewrite
+    unsigned int len;
+    MOV_ctab_t *t;
     c->ctab = av_realloc(c->ctab, ++c->ctab_size);
     t = c->ctab[c->ctab_size];
     t->seed = get_be32(pb);
index 85965786f9bbeb025aeb8ba2080f340f93536733..84ddb466ec8b8aec0007a994d79a75f9e1369473 100644 (file)
@@ -793,6 +793,7 @@ static int mov_write_trak_tag(ByteIOContext *pb, MOVTrack* track)
     return updateSize(pb, pos);
 }
 
+#if 0
 /* TODO: Not sorted out, but not necessary either */
 static int mov_write_iods_tag(ByteIOContext *pb, MOVContext *mov)
 {
@@ -806,6 +807,7 @@ static int mov_write_iods_tag(ByteIOContext *pb, MOVContext *mov)
     put_be16(pb, 0x01ff);
     return 0x15;
 }
+#endif
 
 static int mov_write_mvhd_tag(ByteIOContext *pb, MOVContext *mov)
 {
index 6399cf30620449881e6e408a65ce34cf84a89001..acb33dde6c2ed42b6d5a37250004375a661413a3 100644 (file)
@@ -530,6 +530,7 @@ static int get_vcd_padding_size(AVFormatContext *ctx, int64_t pts)
 }
 
 
+#if 0 /* unused, remove? */
 /* return the exact available payload size for the next packet for
    stream 'stream_index'. 'pts' and 'dts' are only used to know if
    timestamps are needed in the packet header. */
@@ -613,6 +614,7 @@ static int get_packet_payload_size(AVFormatContext *ctx, int stream_index,
     }
     return s->packet_size - buf_index; 
 }
+#endif
 
 /* Write an MPEG padding packet header. */
 static void put_padding_packet(AVFormatContext *ctx, ByteIOContext *pb,int packet_bytes)
@@ -979,6 +981,7 @@ static void put_vcd_padding_sector(AVFormatContext *ctx)
     s->packet_number++;
 }
 
+#if 0 /* unused, remove? */
 static int64_t get_vcd_scr(AVFormatContext *ctx,int stream_index,int64_t pts)
 {
     MpegMuxContext *s = ctx->priv_data;
@@ -998,6 +1001,7 @@ static int64_t get_vcd_scr(AVFormatContext *ctx,int stream_index,int64_t pts)
 
     return scr;
 }    
+#endif
 
 static int remove_decoded_packets(AVFormatContext *ctx, int64_t scr){
 //    MpegMuxContext *s = ctx->priv_data;
@@ -1319,6 +1323,7 @@ static int find_next_start_code(ByteIOContext *pb, int *size_ptr,
     return val;
 }
 
+#if 0 /* unused, remove? */
 /* XXX: optimize */
 static int find_prev_start_code(ByteIOContext *pb, int *size_ptr)
 {
@@ -1351,6 +1356,7 @@ static int find_prev_start_code(ByteIOContext *pb, int *size_ptr)
     *size_ptr = pos_start - pos;
     return start_code;
 }
+#endif
 
 /* read the next PES header. Return its position in ppos 
    (if not NULL), and its start code, pts and dts.
index 555a71a2ed138eb66d0d286c307a24a28bf719a8..66a5647af413a50e2b64a721e78669822905bfb2 100644 (file)
@@ -280,16 +280,11 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
 {
     NSVContext *nsv = s->priv_data;
     ByteIOContext *pb = &s->pb;
-    uint32_t tag, tag1, handler;
-    int codec_type, stream_index, frame_period, bit_rate, scale, rate;
-    unsigned int file_size, size, nb_frames;
+    unsigned int file_size, size;
     int64_t duration;
     int strings_size;
     int table_entries;
     int table_entries_used;
-    int i, n;
-    AVStream *st;
-    NSVStream *ast;
 
     PRINT(("%s()\n", __FUNCTION__));
 
@@ -501,14 +496,7 @@ fail:
 static int nsv_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
     NSVContext *nsv = s->priv_data;
-    ByteIOContext *pb = &s->pb;
-    uint32_t tag, tag1, handler;
-    int codec_type, stream_index, frame_period, bit_rate, scale, rate;
-    unsigned int size, nb_frames;
-    int table_entries;
-    int i, n, err;
-    AVStream *st;
-    NSVStream *ast;
+    int i, err;
 
     PRINT(("%s()\n", __FUNCTION__));
     PRINT(("filename '%s'\n", s->filename));
@@ -543,7 +531,6 @@ static int nsv_read_chunk(AVFormatContext *s, int fill_header)
     AVStream *st[2] = {NULL, NULL};
     NSVStream *nst;
     AVPacket *pkt;
-    uint32_t v = 0;
     int i, err = 0;
     uint8_t auxcount; /* number of aux metadata, also 4 bits of vsize */
     uint32_t vsize;
@@ -667,7 +654,6 @@ null_chunk_retry:
 static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
     NSVContext *nsv = s->priv_data;
-    ByteIOContext *pb = &s->pb;
     int i, err = 0;
 
     PRINT(("%s()\n", __FUNCTION__));
@@ -695,18 +681,20 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt)
 
 static int nsv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 {
+#if 0
     NSVContext *avi = s->priv_data;
     AVStream *st;
     NSVStream *ast;
     int frame_number, i;
     int64_t pos;
+#endif
 
     return -1;
 }
 
 static int nsv_read_close(AVFormatContext *s)
 {
-    int i;
+/*     int i; */
     NSVContext *nsv = s->priv_data;
 
     if (nsv->index_entries)
index f43797582d58712b885a287680532c9f102daeae..2592d320f2aa993ba324b09bf9482aef30be4549 100644 (file)
@@ -1051,7 +1051,7 @@ static int decode_info_header(NUTContext *nut){
         }
         
         if(!strcmp(type, "v")){
-            int value= get_v(bc);
+            get_v(bc);
         }else{
             if(!strcmp(name, "Author"))
                 get_str(bc, s->author, sizeof(s->author));
index 57fc97d3a22cb2b62bb8093145db882a2d1a0157..eca6316f6cf3373bd0c9ae1ab7f92f7f20e0b69e 100644 (file)
@@ -107,6 +107,7 @@ static int str_probe(AVProbeData *p)
     return 50;
 }
 
+#if 0
 static void dump(unsigned char *buf,size_t len)
 {
     int i;
@@ -117,6 +118,7 @@ static void dump(unsigned char *buf,size_t len)
     }
     av_log(NULL, AV_LOG_DEBUG, "\n");
 }
+#endif
 
 static int str_read_header(AVFormatContext *s,
                            AVFormatParameters *ap)
index 8ec84ec4b6c672f072d3406da12c8534f341e2e8..33702e0ec0cac984b372034b1c066a7243935919 100644 (file)
@@ -57,8 +57,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
     struct sockaddr_in dest_addr;
     char hostname[1024], *q;
     int port, fd = -1;
-    TCPContext *s;
-    const char *p;
+    TCPContext *s = NULL;
     fd_set wfds;
     int fd_max, ret;
     struct timeval tv;
index b95f238d26a5356cd204cee2bf0562be19669f10..8b5fc32a2c38e96070f3c65f68067467c060a60c 100644 (file)
@@ -160,14 +160,14 @@ int udp_ipv6_set_local(URLContext *h) {
     socklen_t addrlen;
     char sbuf[NI_MAXSERV];
     char hbuf[NI_MAXHOST];
-    struct addrinfo *res0;
+    struct addrinfo *res0 = NULL;
     int family;
                 
     if (s->local_port != 0) {       
         res0 = udp_ipv6_resolve_host(0, s->local_port, SOCK_DGRAM, AF_UNSPEC, AI_PASSIVE);
-        if (res0 == 0) return -1;
+        if (res0 == 0)
+            goto fail;
         family = res0->ai_family;
-        freeaddrinfo(res0);
     } else {
         family = s->dest_addr.ss_family;
     }
@@ -183,6 +183,8 @@ int udp_ipv6_set_local(URLContext *h) {
             perror("bind");
             goto fail;
         }
+        freeaddrinfo(res0);
+        res0 = NULL;
     } 
 
     addrlen = sizeof(clientaddr);
@@ -207,6 +209,8 @@ int udp_ipv6_set_local(URLContext *h) {
 #else
         close(udp_fd);
 #endif
+    if(res0)
+        freeaddrinfo(res0);
     return -1;
 }
 
@@ -274,13 +278,16 @@ int udp_get_file_handle(URLContext *h)
 /* return non zero if error */
 static int udp_open(URLContext *h, const char *uri, int flags)
 {
-    struct sockaddr_in my_addr, my_addr1;
     char hostname[1024];
     int port, udp_fd = -1, tmp;
     UDPContext *s = NULL;
-    int is_output, len;
+    int is_output;
     const char *p;
     char buf[256];
+#ifndef CONFIG_IPV6
+    struct sockaddr_in my_addr, my_addr1;
+    int len;
+#endif
 
     h->is_streamed = 1;
     h->max_packet_size = 1472;
index 3f74ed529b5479b79d53fedf114872ebd28baadc..0e008da9740d4d6bea6f52616751765b3b90de97 100644 (file)
@@ -1275,7 +1275,6 @@ av_log(s, AV_LOG_DEBUG, "%Ld %Ld %Ld / %Ld %Ld %Ld target:%Ld limit:%Ld start:%L
 }
 
 static int av_seek_frame_byte(AVFormatContext *s, int stream_index, int64_t pos, int flags){
-    AVInputFormat *avif= s->iformat;
     int64_t pos_min, pos_max;
 #if 0
     AVStream *st;
index 6f3dcb73795850be34df73c17655ba4b8864f67d..214ee9fff16a359f0bf924887778cb5509588e58 100644 (file)
@@ -140,7 +140,6 @@ void get_audio_frame(int16_t *samples, int frame_size, int nb_channels)
 
 void write_audio_frame(AVFormatContext *oc, AVStream *st)
 {
-    int out_size;
     AVCodecContext *c;
     AVPacket pkt;
     av_init_packet(&pkt);