libavformat/smush.c:185: error: Uninitialized Value
  The value read from channels was never initialized.

libavformat/smush.c:185:9: 
183.         ast->codec->codec_tag   = 0;
184.         ast->codec->sample_rate = sample_rate;
185.         ast->codec->channels    = channels;
             ^
186. 
187.         avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);

static int smush_read_header(AVFormatContext *ctx)
{
    SMUSHContext *smush = ctx->priv_data;
    AVIOContext *pb = ctx->pb;
    AVStream *vst, *ast;
    uint32_t magic, nframes, size, subversion, i;
    uint32_t width = 0, height = 0, got_audio = 0, read = 0;
    uint32_t sample_rate, channels, palette[256];
    magic = avio_rb32(pb);
    avio_skip(pb, 4);
    if (magic == MKBETAG('A', 'N', 'I', 'M')) {
        if (avio_rb32(pb) != MKBETAG('A', 'H', 'D', 'R'))
            return AVERROR_INVALIDDATA;
        size = avio_rb32(pb);
        if (size < 3 * 256 + 6)
            return AVERROR_INVALIDDATA;
        smush->version = 0;
        subversion     = avio_rl16(pb);
        nframes        = avio_rl16(pb);
        if (!nframes)
            return AVERROR_INVALIDDATA;
        avio_skip(pb, 2);
        for (i = 0; i < 256; i++)
            palette[i] = avio_rb24(pb);
        avio_skip(pb, size - (3 * 256 + 6));
    } else if (magic == MKBETAG('S', 'A', 'N', 'M')) {
        if (avio_rb32(pb) != MKBETAG('S', 'H', 'D', 'R'))
            return AVERROR_INVALIDDATA;
        size = avio_rb32(pb);
        if (size < 14)
            return AVERROR_INVALIDDATA;
        smush->version = 1;
        subversion = avio_rl16(pb);
        nframes = avio_rl32(pb);
        if (!nframes)
            return AVERROR_INVALIDDATA;
        avio_skip(pb, 2);
        width  = avio_rl16(pb);
        height = avio_rl16(pb);
        avio_skip(pb, 2);
        avio_skip(pb, size - 14);
        if (avio_rb32(pb) != MKBETAG('F', 'L', 'H', 'D'))
            return AVERROR_INVALIDDATA;
        size = avio_rb32(pb);
        while (!got_audio && ((read + 8) < size)) {
            uint32_t sig, chunk_size;
            if (pb->eof_reached)
                return AVERROR_EOF;
            sig        = avio_rb32(pb);
            chunk_size = avio_rb32(pb);
            read      += 8;
            switch (sig) {
            case MKBETAG('W', 'a', 'v', 'e'):
                got_audio = 1;
                sample_rate = avio_rl32(pb);
                if (!sample_rate)
                    return AVERROR_INVALIDDATA;
                channels = avio_rl32(pb);
                if (!channels)
                    return AVERROR_INVALIDDATA;
                avio_skip(pb, chunk_size - 8);
                read += chunk_size;
                break;
            case MKBETAG('B', 'l', '1', '6'):
            case MKBETAG('A', 'N', 'N', 'O'):
                avio_skip(pb, chunk_size);
                read += chunk_size;
                break;
            default:
                return AVERROR_INVALIDDATA;
                break;
            }
        }
        avio_skip(pb, size - read);
    } else {
        av_log(ctx, AV_LOG_ERROR, "Wrong magic\n");
        return AVERROR_INVALIDDATA;
    }
    vst = avformat_new_stream(ctx, 0);
    if (!vst)
        return AVERROR(ENOMEM);
    smush->video_stream_index = vst->index;
    avpriv_set_pts_info(vst, 64, 1, 15);
    vst->start_time        = 0;
    vst->duration          =
    vst->nb_frames         = nframes;
    vst->avg_frame_rate    = av_inv_q(vst->time_base);
    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
    vst->codec->codec_id   = AV_CODEC_ID_SANM;
    vst->codec->codec_tag  = 0;
    vst->codec->width      = width;
    vst->codec->height     = height;
    if (!smush->version) {
        av_free(vst->codec->extradata);
        vst->codec->extradata_size = 1024 + 2;
        vst->codec->extradata = av_malloc(vst->codec->extradata_size +
                                          FF_INPUT_BUFFER_PADDING_SIZE);
        if (!vst->codec->extradata)
            return AVERROR(ENOMEM);
        AV_WL16(vst->codec->extradata, subversion);
        for (i = 0; i < 256; i++)
            AV_WL32(vst->codec->extradata + 2 + i * 4, palette[i]);
    }
    if (got_audio) {
        ast = avformat_new_stream(ctx, 0);
        if (!ast)
            return AVERROR(ENOMEM);
        smush->audio_stream_index = ast->index;
        ast->start_time         = 0;
        ast->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
        ast->codec->codec_id    = AV_CODEC_ID_ADPCM_VIMA;
        ast->codec->codec_tag   = 0;
        ast->codec->sample_rate = sample_rate;
        ast->codec->channels    = channels;
        avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
    }
    return 0;
}
['static int smush_read_header(AVFormatContext *ctx)\n{\n    SMUSHContext *smush = ctx->priv_data;\n    AVIOContext *pb = ctx->pb;\n    AVStream *vst, *ast;\n    uint32_t magic, nframes, size, subversion, i;\n    uint32_t width = 0, height = 0, got_audio = 0, read = 0;\n    uint32_t sample_rate, channels, palette[256];\n    magic = avio_rb32(pb);\n    avio_skip(pb, 4);\n    if (magic == MKBETAG(\'A\', \'N\', \'I\', \'M\')) {\n        if (avio_rb32(pb) != MKBETAG(\'A\', \'H\', \'D\', \'R\'))\n            return AVERROR_INVALIDDATA;\n        size = avio_rb32(pb);\n        if (size < 3 * 256 + 6)\n            return AVERROR_INVALIDDATA;\n        smush->version = 0;\n        subversion     = avio_rl16(pb);\n        nframes        = avio_rl16(pb);\n        if (!nframes)\n            return AVERROR_INVALIDDATA;\n        avio_skip(pb, 2);\n        for (i = 0; i < 256; i++)\n            palette[i] = avio_rb24(pb);\n        avio_skip(pb, size - (3 * 256 + 6));\n    } else if (magic == MKBETAG(\'S\', \'A\', \'N\', \'M\')) {\n        if (avio_rb32(pb) != MKBETAG(\'S\', \'H\', \'D\', \'R\'))\n            return AVERROR_INVALIDDATA;\n        size = avio_rb32(pb);\n        if (size < 14)\n            return AVERROR_INVALIDDATA;\n        smush->version = 1;\n        subversion = avio_rl16(pb);\n        nframes = avio_rl32(pb);\n        if (!nframes)\n            return AVERROR_INVALIDDATA;\n        avio_skip(pb, 2);\n        width  = avio_rl16(pb);\n        height = avio_rl16(pb);\n        avio_skip(pb, 2);\n        avio_skip(pb, size - 14);\n        if (avio_rb32(pb) != MKBETAG(\'F\', \'L\', \'H\', \'D\'))\n            return AVERROR_INVALIDDATA;\n        size = avio_rb32(pb);\n        while (!got_audio && ((read + 8) < size)) {\n            uint32_t sig, chunk_size;\n            if (pb->eof_reached)\n                return AVERROR_EOF;\n            sig        = avio_rb32(pb);\n            chunk_size = avio_rb32(pb);\n            read      += 8;\n            switch (sig) {\n            case MKBETAG(\'W\', \'a\', \'v\', \'e\'):\n                got_audio = 1;\n                sample_rate = avio_rl32(pb);\n                if (!sample_rate)\n                    return AVERROR_INVALIDDATA;\n                channels = avio_rl32(pb);\n                if (!channels)\n                    return AVERROR_INVALIDDATA;\n                avio_skip(pb, chunk_size - 8);\n                read += chunk_size;\n                break;\n            case MKBETAG(\'B\', \'l\', \'1\', \'6\'):\n            case MKBETAG(\'A\', \'N\', \'N\', \'O\'):\n                avio_skip(pb, chunk_size);\n                read += chunk_size;\n                break;\n            default:\n                return AVERROR_INVALIDDATA;\n                break;\n            }\n        }\n        avio_skip(pb, size - read);\n    } else {\n        av_log(ctx, AV_LOG_ERROR, "Wrong magic\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    vst = avformat_new_stream(ctx, 0);\n    if (!vst)\n        return AVERROR(ENOMEM);\n    smush->video_stream_index = vst->index;\n    avpriv_set_pts_info(vst, 64, 1, 15);\n    vst->start_time        = 0;\n    vst->duration          =\n    vst->nb_frames         = nframes;\n    vst->avg_frame_rate    = av_inv_q(vst->time_base);\n    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;\n    vst->codec->codec_id   = AV_CODEC_ID_SANM;\n    vst->codec->codec_tag  = 0;\n    vst->codec->width      = width;\n    vst->codec->height     = height;\n    if (!smush->version) {\n        av_free(vst->codec->extradata);\n        vst->codec->extradata_size = 1024 + 2;\n        vst->codec->extradata = av_malloc(vst->codec->extradata_size +\n                                          FF_INPUT_BUFFER_PADDING_SIZE);\n        if (!vst->codec->extradata)\n            return AVERROR(ENOMEM);\n        AV_WL16(vst->codec->extradata, subversion);\n        for (i = 0; i < 256; i++)\n            AV_WL32(vst->codec->extradata + 2 + i * 4, palette[i]);\n    }\n    if (got_audio) {\n        ast = avformat_new_stream(ctx, 0);\n        if (!ast)\n            return AVERROR(ENOMEM);\n        smush->audio_stream_index = ast->index;\n        ast->start_time         = 0;\n        ast->codec->codec_type  = AVMEDIA_TYPE_AUDIO;\n        ast->codec->codec_id    = AV_CODEC_ID_ADPCM_VIMA;\n        ast->codec->codec_tag   = 0;\n        ast->codec->sample_rate = sample_rate;\n        ast->codec->channels    = channels;\n        avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);\n    }\n    return 0;\n}']